diff --git a/lib/RadioButton.js b/lib/RadioButton.js index 819c1d8..fa0867b 100644 --- a/lib/RadioButton.js +++ b/lib/RadioButton.js @@ -11,7 +11,7 @@ export default class RadioButton extends Component { static propTypes = { label: PropTypes.string, theme: PropTypes.oneOf(THEME_NAME), - primary: PropTypes.oneOf(PRIMARY_COLORS), + primary: PropTypes.oneOfType([PropTypes.oneOf(PRIMARY_COLORS), PropTypes.string]), value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, checked: PropTypes.bool, disabled: PropTypes.bool, @@ -26,7 +26,7 @@ export default class RadioButton extends Component { render() { const { theme, primary, value, checked, disabled, onSelect } = this.props; - const primaryColor = COLOR[`${primary}500`].color; + const primaryColor = (COLOR[`${primary}500`] || {}).color || primary; let status = (()=> { if (disabled) {