Skip to content

Commit

Permalink
chore: types cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JairajJangle committed Jul 10, 2023
1 parent f6006b7 commit 79e1b7b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/types/treeView.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ export interface TreeNode {
[key: string]: any;
}

export interface __FlattenedTreeNode__ {
id: string;
name: string;
children?: TreeNode[];
export interface __FlattenedTreeNode__ extends TreeNode {
level?: number;
[key: string]: any;
}

// Remove non-modifiable keys
export type TreeFlatListProps<ItemT = any> = Omit<
FlashListProps<ItemT>,
"data"
Expand All @@ -50,12 +47,6 @@ export interface TreeViewProps {

type CheckboxProps = Omit<RNPaperCheckboxAndroidProps, "onPress" | "status">;

export interface CheckBoxViewProps extends CheckBoxViewStyleProps {
value: CheckboxValueType;
onValueChange: (value: boolean) => void;
text: string;
}

export interface CheckBoxViewStyleProps {
// Optional style modifiers
outermostParentViewStyle?: StyleProp<ViewStyle> | {};
Expand All @@ -67,6 +58,12 @@ export interface CheckBoxViewStyleProps {
textProps?: TextProps;
}

export interface CheckBoxViewProps extends CheckBoxViewStyleProps {
value: CheckboxValueType;
onValueChange: (value: boolean) => void;
text: string;
}

export interface TreeViewRef {
selectAll: () => void;
unselectAll: () => void;
Expand Down

0 comments on commit 79e1b7b

Please sign in to comment.