Use ClassNames in Radio

old
Javi Velasco 2015-11-28 19:54:45 +01:00
parent 5a002b4712
commit 3b1e1f0b6e
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import React from 'react';
import ClassNames from 'classnames';
import Ripple from '../ripple';
import style from './style';
import events from '../utils/events';
@ -50,9 +51,8 @@ class RadioButton extends React.Component {
}
render () {
let labelClassName = style[this.props.disabled ? 'disabled' : 'field'];
const labelClassName = ClassNames(style[this.props.disabled ? 'disabled' : 'field'], this.props.className);
const radioClassName = style[this.props.checked ? 'radio-checked' : 'radio'];
if (this.props.className) labelClassName += ` ${this.props.className}`;
return (
<label className={labelClassName} onClick={this.handleClick}>