This commit is contained in:
mgabdev
2020-04-28 01:33:58 -04:00
parent 763694b5ab
commit c3d0d8bde2
87 changed files with 1392 additions and 826 deletions

View File

@@ -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}