20 lines
437 B
JavaScript
20 lines
437 B
JavaScript
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 = {
|
|
password: PropTypes.bool,
|
|
children: PropTypes.node
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<input type={this.props.password ? 'password' : 'text'} style={style.base}>{this.props.children}</input>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default Radium(Input)
|