-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
46 lines (42 loc) · 1.35 KB
/
App.js
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
import { createStackNavigator } from '@react-navigation/stack';
import { FontAwesome } from '@expo/vector-icons';
import { NavigationContainer, DefaultTheme, DarkTheme } from '@react-navigation/native';
import { StatusBar } from 'react-native';
import HelpScreen from './HelpScreen';
import MainScreen from './MainScreen';
const Stack = createStackNavigator();
export default function App() {
return (
<NavigationContainer theme={DefaultTheme}>
<StatusBar backgroundColor="transparent" barStyle="dark-content" />
<Stack.Navigator initialRouteName="Main">
<Stack.Screen
name="Main"
component={MainScreen}
options={({ navigation }) => ({
title: 'BARBUILDER',
headerShown: false,
headerRight: () => (
<FontAwesome
name="question-circle"
size={30}
color={DefaultTheme.colors.text}
style={styles.icon}
onPress={() => navigation.navigate('Help')}
/>
)
})}
/>
<Stack.Screen
name="Help"
component={HelpScreen}
options={{
title: 'Help',
headerBackTitle: 'Back',
headerShown: false
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}