Skip to content

Commit c52061f

Browse files
committed
chore: #78 updated example app with example for multi tree view components
1 parent 2123101 commit c52061f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

example/src/App.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
NeitherToChildrenNorToParentSmallDataScreen
1717
} from './screens/SelectionPropagationScreens';
1818
import packageJson from '../../package.json';
19+
import { TwoTreeViewsScreen } from "./screens/TwoTreeViewsScreen";
1920

2021
const data: ShowcaseExampleScreenSectionType[] = [
2122
{
@@ -78,6 +79,16 @@ const data: ShowcaseExampleScreenSectionType[] = [
7879
},
7980
],
8081
},
82+
{
83+
title: 'Multiple Tree Views',
84+
data: [
85+
{
86+
name: 'Two Tree Views',
87+
slug: 'two-tree-views',
88+
getScreen: () => TwoTreeViewsScreen,
89+
},
90+
],
91+
},
8192
];
8293

8394
export default function App() {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import React from "react";
2+
import SmallDataScreen from "./SmallDataScreen";
3+
import { View, StyleSheet } from "react-native";
4+
5+
export function TwoTreeViewsScreen() {
6+
return (
7+
<>
8+
<View
9+
style={styles.treeViewParent}>
10+
<SmallDataScreen />
11+
</View>
12+
13+
14+
<View
15+
style={styles.treeViewParent}>
16+
<SmallDataScreen />
17+
</View>
18+
</>
19+
);
20+
}
21+
22+
const styles = StyleSheet.create({
23+
treeViewParent: {
24+
flex: 1,
25+
}
26+
});

0 commit comments

Comments
 (0)