import React from 'react' import PropTypes from 'prop-types' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import Icon from './icon' /** * Renders a select element with options * @param {func} props.onChange - function to call on option selection * @param {object} props.options - options for selection * @param {string} [props.value] - value to set selected */ export default class Select extends ImmutablePureComponent { static propTypes = { onChange: PropTypes.func.isRequired, options: PropTypes.oneOf([ ImmutablePropTypes.map, PropTypes.object, ]).isRequired, value: PropTypes.string, } updateOnProps = [ 'options', 'value', ] render() { const { value, options, onChange, } = this.props return (
) } }