quickbuild
Version:
A mature, feature-complete application generator with an emphasis on speed
22 lines (17 loc) • 454 B
JavaScript
/**
*
* ToggleOption
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>{message ? intl.formatMessage(message) : value}</option>
);
ToggleOption.propTypes = {
value: PropTypes.string.isRequired,
message: PropTypes.object,
intl: intlShape.isRequired,
};
export default injectIntl(ToggleOption);