| | |
| | | import PropTypes from 'prop-types' |
| | | import { Radio } from 'antd' |
| | | |
| | | import './index.scss' |
| | | |
| | | class MKRadio extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, |
| | |
| | | |
| | | return ( |
| | | <Radio.Group defaultValue={defaultValue} disabled={config.readonly} onChange={this.onChange}> |
| | | {config.options.map(option => <Radio key={option.key} value={option.value}>{option.label}</Radio>)} |
| | | {config.options.map(option => <Radio key={option.key} disabled={option.$disabled} value={option.value}>{option.label}</Radio>)} |
| | | </Radio.Group> |
| | | ) |
| | | } |