import React, { PropTypes } from 'react'; import { FormGroup, FormControl } from 'react-bootstrap'; import ControlLabelWithTooltip from './ControlLabelWithTooltip'; import { slugify } from '../../modules/utils'; const propTypes = { name: PropTypes.string.isRequired, choices: PropTypes.array, value: PropTypes.string, label: PropTypes.string, description: PropTypes.string, onChange: PropTypes.func, }; const defaultProps = { value: '', label: null, description: null, onChange: () => {}, }; export default class SelectField extends React.Component { onChange(opt) { this.props.onChange(this.props.name, opt.target.value); } render() { return ( {this.props.choices.map((c) => )} ); } } SelectField.propTypes = propTypes; SelectField.defaultProps = defaultProps;