Skip to content

Commit 78baf74

Browse files
authored
Use string union for checkModel and direction (#414)
This provides better type checking and intellisense by limiting the accepted values for these props.
1 parent 49c46d6 commit 78baf74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ declare module "react-checkbox-tree" {
4242
interface CheckboxProps {
4343
nodes: Array<Node>;
4444

45-
checkModel?: string;
45+
checkModel?: 'leaf' | 'all';
4646
checked?: Array<string>;
47-
direction?: string;
47+
direction?: 'ltr' | 'rtl';
4848
disabled?: boolean;
4949
expandDisabled?: boolean;
5050
expandOnClick?: boolean;

0 commit comments

Comments
 (0)