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.
28 lines
661 B
28 lines
661 B
import Radio from 'rc-radio';
|
|
import React from 'react';
|
|
import classNames from 'classnames';
|
|
|
|
const AntRadio = React.createClass({
|
|
getDefaultProps() {
|
|
return {
|
|
prefixCls: 'ant-radio'
|
|
};
|
|
},
|
|
render() {
|
|
const { prefixCls, children, checked, disabled, className } = this.props;
|
|
const classString = classNames({
|
|
[prefixCls]: true,
|
|
[prefixCls + '-checked']: checked,
|
|
[prefixCls + '-disabled']: disabled,
|
|
[className]: !!className,
|
|
});
|
|
return (
|
|
<label className={classString}>
|
|
<Radio {...this.props} children={null} />
|
|
{children}
|
|
</label>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default AntRadio;
|
|
|