Adding some more controls & other clean-up
This commit is contained in:
19
website/src/ui/Input.js
Normal file
19
website/src/ui/Input.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import Radium from 'radium'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { Component } from 'react'
|
||||
import style from './Input.style'
|
||||
|
||||
class Input extends Component {
|
||||
static propTypes = {
|
||||
hidden: PropTypes.bool,
|
||||
children: PropTypes.node
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<input type={this.props.hidden ? 'password' : 'text'} style={style.base}>{this.props.children}</input>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Radium(Input)
|
||||
Reference in New Issue
Block a user