Login screen looking good

This commit is contained in:
John Lyon-Smith
2018-02-26 16:38:18 -08:00
parent 93c1ecb919
commit 5faa4600f5
18 changed files with 120 additions and 135 deletions

View File

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