'use strict'; const React = require('react'); const TextInput = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, label: React.PropTypes.string.isRequired, id: React.PropTypes.string.isRequired, placeholder: React.PropTypes.string, value: React.PropTypes.string, required: React.PropTypes.bool, }, getDefaultProps () { return { required: false, }; }, getInitialState () { return {}; }, getValue () { return this.refs.input.getDOMNode().value.trim(); }, render () { return (