-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
51 lines (49 loc) · 1.47 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
47
48
49
50
51
import React from 'react';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {NavigationContainer} from '@react-navigation/native';
import LottieSplashScreen from 'react-native-lottie-splash-screen';
import Favorite from './screens/Favorite';
import Main from './screens/Main';
import {COLORS} from './constants/const';
const Drawer = createDrawerNavigator();
const App = () => {
return (
<NavigationContainer
onReady={() => {
LottieSplashScreen.hide();
}}>
<Drawer.Navigator
initialRouteName="Main"
screenOptions={{
overlayColor: 'transparent',
headerStyle: {
backgroundColor: COLORS.main,
},
headerTintColor: COLORS.white,
drawerActiveBackgroundColor: COLORS.activeBg,
drawerItemStyle: {
width: '100%',
marginLeft: 0,
marginBottom: 0,
marginTop: 0,
borderRadius: 0,
},
drawerLabelStyle: {
color: COLORS.white,
paddingLeft: 20,
fontSize: 18,
},
drawerStyle: {
paddingTop: 25,
backgroundColor: COLORS.main,
shadowColor: COLORS.black,
elevation: 24,
},
}}>
<Drawer.Screen name="Main" component={Main} />
<Drawer.Screen name="Favorites" component={Favorite} />
</Drawer.Navigator>
</NavigationContainer>
);
};
export default App;