Skip to content

Commit 559cd20

Browse files
committed
Reworked PR
1 parent 1c1ff55 commit 559cd20

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

package.json

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

src/types/index.d.ts renamed to src/index.d.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
declare module "react-checkbox-tree"
2-
{
3-
interface Node
4-
{
1+
declare module "react-checkbox-tree" {
2+
interface Node {
53
label: string;
64
value: string;
75
children?: Array<Node>;
@@ -11,8 +9,7 @@ declare module "react-checkbox-tree"
119
showCheckbox?: boolean;
1210
}
1311

14-
interface CheckboxProps
15-
{
12+
interface CheckboxProps {
1613
nodes: Array<Node>;
1714
checked: Array<string>;
1815
expanded: Array<string>;
@@ -29,7 +26,7 @@ declare module "react-checkbox-tree"
2926
onlyLeafCheckboxes?: boolean;
3027
optimisticToggle?: boolean;
3128
showNodeIcon?: boolean;
32-
onClick?: (clicked: string) => void;
29+
onClick?: (event: { checked: boolean, value: any }) => void;
3330
}
3431

3532
export default class CheckboxTree extends React.Component<CheckboxProps> { }

0 commit comments

Comments
 (0)