Login screen looking good
This commit is contained in:
@@ -6,12 +6,17 @@ import style from './Input.style'
|
||||
class Input extends Component {
|
||||
static propTypes = {
|
||||
password: PropTypes.bool,
|
||||
children: PropTypes.node
|
||||
children: PropTypes.node,
|
||||
width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ])
|
||||
}
|
||||
|
||||
render() {
|
||||
let { children, width } = this.props
|
||||
|
||||
width = width || '100%'
|
||||
|
||||
return (
|
||||
<input type={this.props.password ? 'password' : 'text'} style={style.base}>{this.props.children}</input>
|
||||
<input type={this.props.password ? 'password' : 'text'} style={[ { width }, style.base ]}>{children}</input>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user