import React from 'react' import inputStyle from './input.js' /*** Number fields with support for min, max and units and documentation*/ class StringField extends React.Component { static propTypes = { onChange: React.PropTypes.func.isRequired, name: React.PropTypes.string.isRequired, value: React.PropTypes.string, default: React.PropTypes.number, doc: React.PropTypes.string, } onChange(e) { const value = e.target.value return this.props.onChange(value === "" ? null: value) } render() { return
} } export default StringField