import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { injectIntl } from 'react-intl'; import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; class RadioPanel extends PureComponent { static propTypes = { values: ImmutablePropTypes.list.isRequired, value: PropTypes.object.isRequired, intl: PropTypes.object.isRequired, onChange: PropTypes.func.isRequired, }; handleChange = e => { const value = e.currentTarget.getAttribute('data-value'); if (value !== this.props.value.get('value')) { this.props.onChange(value); } }; render () { const { values, value } = this.props; return (