-
-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathindex.tsx
131 lines (124 loc) · 3.98 KB
/
index.tsx
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import { ScreenNames } from '../../constants/screenNames';
import KeyboardAnimation from '../../screens/Examples/KeyboardAnimation';
import ReanimatedChat from '../../screens/Examples/ReanimatedChat';
import Events from '../../screens/Examples/Events';
import AwareScrollView from '../../screens/Examples/AwareScrollView';
import StatusBar from '../../screens/Examples/StatusBar';
import LottieAnimation from '../../screens/Examples/Lottie';
import NonUIProps from '../../screens/Examples/NonUIProps';
import InteractiveKeyboard from '../../screens/Examples/InteractiveKeyboard';
import InteractiveKeyboardIOS from '../../screens/Examples/InteractiveKeyboardIOS';
import NativeStack from '../NestedStack';
import KeyboardAvoidingViewExample from '../../screens/Examples/KeyboardAvoidingView';
export type ExamplesStackParamList = {
[ScreenNames.ANIMATED_EXAMPLE]: undefined;
[ScreenNames.REANIMATED_CHAT]: undefined;
[ScreenNames.EVENTS]: undefined;
[ScreenNames.AWARE_SCROLL_VIEW]: undefined;
[ScreenNames.STATUS_BAR]: undefined;
[ScreenNames.LOTTIE]: undefined;
[ScreenNames.NON_UI_PROPS]: undefined;
[ScreenNames.INTERACTIVE_KEYBOARD]: undefined;
[ScreenNames.INTERACTIVE_KEYBOARD_IOS]: undefined;
[ScreenNames.NATIVE_STACK]: undefined;
[ScreenNames.KEYBOARD_AVOIDING_VIEW]: undefined;
};
const Stack = createStackNavigator<ExamplesStackParamList>();
const options = {
[ScreenNames.ANIMATED_EXAMPLE]: {
title: 'Keyboard animation ⌨️',
},
[ScreenNames.REANIMATED_CHAT]: {
title: 'Chat',
},
[ScreenNames.EVENTS]: {
title: 'Events',
},
[ScreenNames.AWARE_SCROLL_VIEW]: {
title: 'Aware scroll view',
},
[ScreenNames.STATUS_BAR]: {
headerShown: false,
title: 'Status bar manipulation',
},
[ScreenNames.LOTTIE]: {
title: 'Lottie animation',
},
[ScreenNames.NON_UI_PROPS]: {
title: 'Non UI Props',
},
[ScreenNames.INTERACTIVE_KEYBOARD]: {
title: 'Interactive keyboard',
},
[ScreenNames.INTERACTIVE_KEYBOARD_IOS]: {
title: 'Interactive keyboard 🍏',
},
[ScreenNames.NATIVE_STACK]: {
title: 'Native stack',
},
[ScreenNames.KEYBOARD_AVOIDING_VIEW]: {
title: 'KeyboardAvoidingView',
},
};
const ExamplesStack = () => (
<Stack.Navigator>
<Stack.Screen
name={ScreenNames.ANIMATED_EXAMPLE}
component={KeyboardAnimation}
options={options[ScreenNames.ANIMATED_EXAMPLE]}
/>
<Stack.Screen
name={ScreenNames.REANIMATED_CHAT}
component={ReanimatedChat}
options={options[ScreenNames.REANIMATED_CHAT]}
/>
<Stack.Screen
name={ScreenNames.EVENTS}
component={Events}
options={options[ScreenNames.EVENTS]}
/>
<Stack.Screen
name={ScreenNames.AWARE_SCROLL_VIEW}
component={AwareScrollView}
options={options[ScreenNames.AWARE_SCROLL_VIEW]}
/>
<Stack.Screen
name={ScreenNames.STATUS_BAR}
component={StatusBar}
options={options[ScreenNames.STATUS_BAR]}
/>
<Stack.Screen
name={ScreenNames.LOTTIE}
component={LottieAnimation}
options={options[ScreenNames.LOTTIE]}
/>
<Stack.Screen
name={ScreenNames.NON_UI_PROPS}
component={NonUIProps}
options={options[ScreenNames.NON_UI_PROPS]}
/>
<Stack.Screen
name={ScreenNames.INTERACTIVE_KEYBOARD}
component={InteractiveKeyboard}
options={options[ScreenNames.INTERACTIVE_KEYBOARD]}
/>
<Stack.Screen
name={ScreenNames.INTERACTIVE_KEYBOARD_IOS}
component={InteractiveKeyboardIOS}
options={options[ScreenNames.INTERACTIVE_KEYBOARD_IOS]}
/>
<Stack.Screen
name={ScreenNames.NATIVE_STACK}
component={NativeStack}
options={options[ScreenNames.NATIVE_STACK]}
/>
<Stack.Screen
name={ScreenNames.KEYBOARD_AVOIDING_VIEW}
component={KeyboardAvoidingViewExample}
options={options[ScreenNames.KEYBOARD_AVOIDING_VIEW]}
/>
</Stack.Navigator>
);
export default ExamplesStack;