-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
62 lines (51 loc) · 2.03 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
52
53
54
55
56
57
58
59
60
61
62
import { createDrawerNavigator,DrawerItems } from 'react-navigation-drawer';
import {createAppContainer, StackActions} from 'react-navigation';
import AboutScreen from './src/screens/AboutScreen';
// import TabNavigator from './src/screens/bottomTabNavigator.js';
import About from './src/screens/About';
import AboutStack from './src/screens/stack';
import {MaterialCommunityIcons, AntDesign, Entypo} from '@expo/vector-icons';
import React, { useState } from 'react';
import Header from './src/screens/header';
import { StyleSheet, Text, View, FlatList,Button,TouchableOpacity ,Image,Modal} from 'react-native';
import AboutPass from './src/screens/pass';
import {Container,Body,Content} from 'native-base';
/*const [modalOpen,setModalopen]=useState(false);*/
const CustomDrawerContentComponent=(props)=>(
<Container style={{}}>
<View style={{alignSelf:"center",height:250,width:"100%", backgroundColor:"#d11d4c"}}>
<Image style={{height:180,width:180,borderRadius:100,alignSelf:"center", marginTop:50}} source={{uri:'https://i.dlpng.com/static/png/4674369-food-icon-food-court-icon-png-transparent-png-600x600-free-food-courts-in-malls-png-820_640_preview.png'}}/>
</View>
<Content>
<DrawerItems {...props}
/>
</Content>
</Container>
)
const RootDrawerNavigator = createDrawerNavigator({
Home: {
screen: AboutStack,
navigationOptions: {
drawerIcon: () => <MaterialCommunityIcons name="home" color='black' size={26} />}
},
Filter: {
screen: AboutScreen,
navigationOptions: {
drawerIcon: () => <AntDesign name="filter" color='black' size={26} />
},
},
About: {
screen: AboutPass,
navigationOptions: {
drawerIcon: () => <Entypo name="info-with-circle" size={24} color="black" />
},
},
},{
initialRouteName:'Home',
contentComponent:CustomDrawerContentComponent,
drawerOpenRoute:'DrawerOpen',
drawerCloseRoute:'DrawerClose',
drawerToggleRoute:'DrawerToogle',
}
);
export default createAppContainer(RootDrawerNavigator);