Get modal with embedded form working

This commit is contained in:
John Lyon-Smith
2018-02-28 13:15:46 -08:00
parent 6f4330adc5
commit eb54ca0b62
6 changed files with 75 additions and 48 deletions

View File

@@ -12,15 +12,16 @@ class Input extends Component {
visible: PropTypes.bool,
disabled: PropTypes.bool,
name: PropTypes.string,
value: PropTypes.string,
}
render() {
let { name, width, password, placeholder, onChange, visible, disabled } = this.props
let { name, width, password, placeholder, onChange, visible, disabled, value } = this.props
width = width || '100%'
return (
<input name={name} type={!visible ? 'hidden' : password ? 'password' : 'text'} disabled={disabled}
<input name={name} value={value} type={!visible ? 'hidden' : password ? 'password' : 'text'} disabled={disabled}
style={[ { width }, style.base ]} placeholder={placeholder} onChange={onChange} />
)
}