|
|
@ -2,12 +2,16 @@ import RcCheckbox from 'rc-checkbox'; |
|
|
|
import React from 'react'; |
|
|
|
import CheckboxGroup from './Group'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
|
|
|
|
|
|
|
export default class Checkbox extends React.Component { |
|
|
|
static Group = CheckboxGroup; |
|
|
|
static defaultProps = { |
|
|
|
prefixCls: 'ant-checkbox', |
|
|
|
} |
|
|
|
shouldComponentUpdate(...args) { |
|
|
|
return PureRenderMixin.shouldComponentUpdate.apply(this, args); |
|
|
|
} |
|
|
|
render() { |
|
|
|
const { prefixCls, style, children, className, ...restProps } = this.props; |
|
|
|
const classString = classNames({ |
|
|
|