File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 4
4
"description" : " A simple and elegant checkbox tree for React." ,
5
5
"author" : " Jake Zatecky" ,
6
6
"license" : " MIT" ,
7
+ "types" : " src/types/index.d.ts" ,
7
8
"keywords" : [
8
9
" react" ,
9
10
" checkbox" ,
Original file line number Diff line number Diff line change
1
+ declare module "react-checkbox-tree"
2
+ {
3
+ interface Node
4
+ {
5
+ label : string ;
6
+ value : string ;
7
+ children ?: Array < Node > ;
8
+ className ?: string ;
9
+ disabled ?: boolean ;
10
+ icon ?: JSX . Element ;
11
+ showCheckbox ?: boolean ;
12
+ }
13
+
14
+ interface CheckboxProps
15
+ {
16
+ nodes : Array < Node > ;
17
+ checked : Array < string > ;
18
+ expanded : Array < string > ;
19
+ onCheck : ( checked : Array < string > ) => void ;
20
+ onExpand : ( expanded : Array < string > ) => void ;
21
+
22
+ disabled ?: boolean ;
23
+ expandDisabled ?: boolean ;
24
+ expandOnClick ?: boolean ;
25
+ name ?: string ;
26
+ nameAsArray ?: boolean ;
27
+ nativeCheckboxes ?: boolean ;
28
+ noCascade ?: boolean ;
29
+ onlyLeafCheckboxes ?: boolean ;
30
+ optimisticToggle ?: boolean ;
31
+ showNodeIcon ?: boolean ;
32
+ onClick ?: ( clicked : string ) => void ;
33
+ }
34
+
35
+ export default class CheckboxTree extends React . Component < CheckboxProps > { }
36
+ }
You can’t perform that action at this time.
0 commit comments