Skip to content

Commit 0a74505

Browse files
committed
Merge branch 'DigitalFlow-master' into v1.3-dev
2 parents 9cd0d44 + 76f1775 commit 0a74505

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "A simple and elegant checkbox tree for React.",
55
"author": "Jake Zatecky",
66
"license": "MIT",
7+
"types": "src/index.d.ts",
78
"keywords": [
89
"react",
910
"checkbox",

src/index.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
declare module "react-checkbox-tree" {
2+
interface Node {
3+
label: string;
4+
value: string;
5+
children?: Array<Node>;
6+
className?: string;
7+
disabled?: boolean;
8+
icon?: JSX.Element;
9+
showCheckbox?: boolean;
10+
}
11+
12+
interface CheckboxProps {
13+
nodes: Array<Node>;
14+
checked: Array<string>;
15+
expanded: Array<string>;
16+
onCheck: (checked: Array<string>) => void;
17+
onExpand: (expanded: Array<string>) => void;
18+
19+
disabled?: boolean;
20+
expandDisabled?: boolean;
21+
expandOnClick?: boolean;
22+
name?: string;
23+
nameAsArray?: boolean;
24+
nativeCheckboxes?: boolean;
25+
noCascade?: boolean;
26+
onlyLeafCheckboxes?: boolean;
27+
optimisticToggle?: boolean;
28+
showNodeIcon?: boolean;
29+
onClick?: (event: { checked: boolean, value: any }) => void;
30+
}
31+
32+
export default class CheckboxTree extends React.Component<CheckboxProps> { }
33+
}

0 commit comments

Comments
 (0)