-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
51 lines (43 loc) · 1.4 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, { Component } from "react";
import { Text } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createDrawerNavigator } from "@react-navigation/drawer";
import ProfileScreen from "./screens/Profile/ProfileScreen";
import Navigation from "./screens/Navigation";
import DrawerContent from './screens/Drawer/DrawerContent';
import Icon1 from 'react-native-vector-icons/Ionicons';
import Icon2 from 'react-native-vector-icons/FontAwesome5';
const Drawer = createDrawerNavigator();
class App extends Component{
render (){
return(
<NavigationContainer>
<Drawer.Navigator
edgeWidth={0}
drawerContentOptions={{
activeTintColor: "black",
activeBackgroundColor: "rgba(0, 0, 0, 0.18)",
}}
drawerContent={props => <DrawerContent {...props} />}>
<Drawer.Screen
name="Navigation"
component={Navigation}
options={{
drawerLabel: config => <Text>Home</Text>,
drawerIcon: config => <Icon1 size={20} name= {'home'}></Icon1>
}}
/>
<Drawer.Screen
name="ProfileScreen"
component={ProfileScreen}
options={{
drawerLabel: config => <Text>My Profile</Text>,
drawerIcon: config => <Icon2 size={17} name= {'user-alt'}></Icon2>
}}
/>
</Drawer.Navigator>
</NavigationContainer>
)
}
};
export default App;