-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathApp.tsx
More file actions
26 lines (24 loc) · 730 Bytes
/
App.tsx
File metadata and controls
26 lines (24 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from 'react';
import { SafeAreaView } from 'react-native';
import { TreeDataTypes, TreeSelect } from 'react-native-tree-selection';
import { StaticData } from './constants/StaticData';
import { styles } from './theme';
const App = () => {
return (
<SafeAreaView style={styles.container}>
<TreeSelect
data={StaticData}
onParentPress={(item: TreeDataTypes) => {
console.log('onPressParent', item);
}}
onChildPress={(item: TreeDataTypes) => {
console.log('onPressChild', item);
}}
onCheckBoxPress={(item: TreeDataTypes[]) => {
console.log('onCheckBox', item);
}}
/>
</SafeAreaView>
);
};
export default App;