26 lines
569 B
JavaScript
Raw Normal View History

2016-10-13 19:31:29 +02:00
/**
*
* ToggleOption
*
*/
import React from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
2016-10-13 20:53:33 +02:00
{typeof message === 'string' ? message : intl.formatMessage(message).toUpperCase()}
2016-10-13 19:31:29 +02:00
</option>
);
ToggleOption.propTypes = {
intl: intlShape.isRequired,
2016-10-13 20:53:33 +02:00
message: React.PropTypes.oneOfType([
2017-08-18 17:02:33 +02:00
React.PropTypes.object.isRequired,
React.PropTypes.string.isRequired,
]).isRequired,
2017-08-18 17:51:10 +02:00
value: React.PropTypes.string.isRequired,
2016-10-13 19:31:29 +02:00
};
export default injectIntl(ToggleOption);