Progress
This commit is contained in:
@@ -7,6 +7,7 @@ import Text from './text'
|
||||
const cx = classNames.bind(_s)
|
||||
|
||||
export default class Input extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
placeholder: PropTypes.string,
|
||||
prependIcon: PropTypes.string,
|
||||
@@ -25,6 +26,10 @@ export default class Input extends PureComponent {
|
||||
hideLabel: PropTypes.bool,
|
||||
}
|
||||
|
||||
handleOnChange = (e) => {
|
||||
this.props.onChange(e.target.value)
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
placeholder,
|
||||
@@ -55,6 +60,7 @@ export default class Input extends PureComponent {
|
||||
py5: small,
|
||||
backgroundTransparent: !readOnly,
|
||||
backgroundColorSubtle2: readOnly,
|
||||
colorPrimary: !readOnly,
|
||||
colorSecondary: readOnly,
|
||||
fontSize15PX: !small,
|
||||
fontSize13PX: small,
|
||||
@@ -101,7 +107,7 @@ export default class Input extends PureComponent {
|
||||
placeholder={placeholder}
|
||||
ref={inputRef}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
onChange={this.handleOnChange}
|
||||
onKeyUp={onKeyUp}
|
||||
onFocus={onFocus}
|
||||
onBlur={onBlur}
|
||||
|
||||
Reference in New Issue
Block a user