@@ -6,20 +6,47 @@ export default class Checkbox extends Component {
6
6
static propTypes = {
7
7
...DefaultProps . propTypes ,
8
8
9
+ /**
10
+ * State checked
11
+ */
9
12
checked : React . PropTypes . bool ,
13
+ /**
14
+ * Does not allow user interaction
15
+ */
10
16
disabled : React . PropTypes . bool ,
11
- fitted : React . PropTypes . bool ,
12
- indeterminate : React . PropTypes . bool ,
13
- name : React . PropTypes . string ,
17
+ /**
18
+ * It does disabled, but does not allow user interaction
19
+ */
20
+ readOnly : React . PropTypes . bool ,
21
+ /**
22
+ * Callback handler to click checkbox
23
+ */
14
24
onClick : React . PropTypes . func ,
25
+ /**
26
+ * Checkbox - appearance
27
+ */
15
28
radio : React . PropTypes . bool ,
16
- readOnly : React . PropTypes . bool ,
29
+ /**
30
+ * Attr name
31
+ */
32
+ name : React . PropTypes . string ,
33
+ /**
34
+ * Checkbox - appearance
35
+ */
17
36
slider : React . PropTypes . bool ,
18
- toggle : React . PropTypes . bool
37
+ /**
38
+ * Checkbox - appearance
39
+ */
40
+ toggle : React . PropTypes . bool ,
41
+ /**
42
+ * A fitted checkbox does not leave padding for a label
43
+ */
44
+ fitted : React . PropTypes . bool
19
45
} ;
20
46
21
47
static defaultProps = {
22
- ...DefaultProps . defaultProps
48
+ ...DefaultProps . defaultProps ,
49
+ onClick : ( ) => { }
23
50
} ;
24
51
25
52
onClick = ( event ) => {
@@ -52,7 +79,7 @@ export default class Checkbox extends Component {
52
79
53
80
render ( ) {
54
81
/* eslint-disable no-use-before-define */
55
- let { component, defaultClasses, name , checked, onClick, ...other } = this . props ;
82
+ let { component, defaultClasses, checked, onClick, name , ...other } = this . props ;
56
83
/* eslint-enable no-use-before-define */
57
84
58
85
other . className = classNames ( this . props . className , this . getClasses ( ) ) ;
0 commit comments