import React, {Component, PropTypes} from 'react' export default class SubjectTextField extends Component { static displayName = 'SubjectTextField' static containerRequired = false static propTypes = { value: PropTypes.string, onSubjectChange: PropTypes.func, } onInputChange = ({target: {value}}) => { this.props.onSubjectChange(value) } focus() { this._el.focus() } render() { const {value} = this.props return (
{ this._el = el; }} type="text" name="subject" placeholder="Subject" value={value} onChange={this.onInputChange} />
); } }