forked from AmitkumarMishra-code/draftbit-oauth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppNavigator.js
More file actions
127 lines (123 loc) · 3.04 KB
/
AppNavigator.js
File metadata and controls
127 lines (123 loc) · 3.04 KB
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
import * as React from 'react';
import { I18nManager, Platform, StyleSheet, Text, View } from 'react-native';
import { systemWeights } from 'react-native-typography';
import { Icon, Touchable } from '@draftbit/ui';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import theme from './themes/DraftbitTheme.js';
import LinkingConfiguration from './LinkingConfiguration.js';
import BlankScreen from './screens/BlankScreen';
import HomeScreen from './screens/HomeScreen';
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
function Placeholder() {
return (
<View
style={{
flex: 1,
backgroundColor: '#131A2A',
justifyContent: 'center',
alignItems: 'center',
padding: 36,
}}
>
<Text
style={{
textAlign: 'center',
fontSize: 24,
fontWeight: 'bold',
marginBottom: 12,
color: '#FFF',
}}
>
Missing Screens
</Text>
<Text
style={{
textAlign: 'center',
fontSize: 16,
color: '#FFF',
marginBottom: 8,
}}
>
Your app doesn't have any screens added to the Root Navigator.
</Text>
<Text style={{ textAlign: 'center', fontSize: 16, color: '#FFF' }}>
Click the + (plus) icon in the Navigator tab on the left side to add
some.
</Text>
</View>
);
}
export default function RootAppNavigator() {
return (
<NavigationContainer linking={LinkingConfiguration}>
<Stack.Navigator initialRouteName="BlankScreen">
<Stack.Screen
name="HomeScreen"
component={HomeScreen}
options={{ title: 'Home' }}
/>
<Stack.Screen
name="BlankScreen"
component={BlankScreen}
options={{ title: 'Blank' }}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
headerIcon: Platform.select({
ios: {
marginVertical: 12,
resizeMode: 'contain',
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
},
default: {
margin: 3,
resizeMode: 'contain',
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
},
}),
headerIconLeft: Platform.select({
ios: {
marginRight: 6,
},
}),
headerIconRight: Platform.select({
ios: {
marginLeft: 6,
},
}),
headerContainer: {
alignItems: 'center',
flexDirection: 'row',
...Platform.select({
ios: null,
default: {
marginVertical: 3,
marginHorizontal: 11,
},
}),
},
headerContainerLeft: Platform.select({
ios: {
marginLeft: 8,
},
}),
headerContainerRight: Platform.select({
ios: {
marginRight: 8,
},
}),
headerLabelWrapper: {
flexDirection: 'row',
alignItems: 'flex-start',
},
headerLabel: {
fontSize: 17,
letterSpacing: 0.35,
},
});