henrybuilt-react-library
Advanced tools
Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "henrybuilt-react-library", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "maxhudson", |
import {_, React, Component} from 'components'; | ||
import {Input as SemanticInput} from 'semantic-ui-react'; | ||
import {Input as SemanticTextInput, TextArea as SemanticTextArea, Label} from 'semantic-ui-react'; | ||
import Input from 'components/form/inputs/input/input.js'; | ||
@@ -31,8 +31,22 @@ | ||
render() { | ||
return <SemanticInput | ||
className='form-input text-input' | ||
value={this.state.value} | ||
onChange={this.handleChange} | ||
onBlur={this.handleBlur} | ||
{..._.pick(this.props, ['name', 'label', 'placeholder'])}/>; | ||
var className = 'form-input text-input'; | ||
var props = { | ||
value: this.state.value, | ||
onChange: this.handleChange, | ||
onBlur: this.handleBlur, | ||
..._.pick(this.props, ['name', 'label', 'placeholder']) | ||
}; | ||
return this.props.isMultiline ? (this.props.label ? ( | ||
<div className={className}> | ||
<Label>{this.props.label}</Label> | ||
<SemanticTextArea className={className} {...props}/> | ||
</div> | ||
) : ( | ||
<SemanticTextArea className={className} {...props}/> | ||
) | ||
) : ( | ||
<SemanticTextInput className={className} {...props}/> | ||
); | ||
} | ||
@@ -61,3 +75,3 @@ | ||
value={this.props.value} | ||
{..._.pick(this.props, ['name', 'label', 'placeholder'])}/>; | ||
{..._.pick(this.props, ['name', 'label', 'placeholder', 'isMultiline'])}/>; | ||
} | ||
@@ -64,0 +78,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
9651550
52
119938