You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
625 B
27 lines
625 B
import Radio from 'rc-radio';
|
|
import React from 'react';
|
|
|
|
const AntRadio = React.createClass({
|
|
getDefaultProps() {
|
|
return {
|
|
prefixCls: 'ant-radio'
|
|
};
|
|
},
|
|
render() {
|
|
let classString = this.props.className;
|
|
if (classString) {
|
|
classString += this.props.checked ? (' ' + classString + '-checked') : '';
|
|
}
|
|
if (this.props.disabled) {
|
|
classString += ' ' + this.props.className + '-disabled';
|
|
}
|
|
return (
|
|
<label className={classString}>
|
|
<Radio {...this.props} children={null} />
|
|
{this.props.children}
|
|
</label>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default AntRadio;
|
|
|