-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
85 lines (80 loc) · 2.51 KB
/
App.tsx
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
import 'react-native-gesture-handler';
import * as React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {createMaterialBottomTabNavigator} from '@react-navigation/material-bottom-tabs';
import IconFontAwesome from 'react-native-vector-icons/FontAwesome';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Feather from 'react-native-vector-icons/Feather';
import DrawerContent from './src/DrawerContent';
import {
FavouriteStackScreen,
HomeStackScreen,
ProfileStackScreen,
SearchStackScreen,
} from './src/StackNavigation';
const Drawer = createDrawerNavigator();
const Tab = createMaterialBottomTabNavigator();
function mainTab() {
return (
<Tab.Navigator
initialRouteName="Home"
activeColor="#FA4A0C"
inactiveColor="#ADADAF"
labeled={false}
barStyle={{backgroundColor: '#9A9A9D'}}>
<Tab.Screen
name="Home"
component={HomeStackScreen}
options={{
tabBarIcon: ({color}) => (
<MaterialCommunityIcons name="home" color={color} size={26} />
),
tabBarColor: '#9A9A9D',
}}
/>
<Tab.Screen
name="Favourite"
component={SearchStackScreen}
options={{
tabBarIcon: ({color}) => (
<IconFontAwesome name="heart-o" size={25} color={color} />
),
}}
/>
<Tab.Screen
name="Profile"
component={FavouriteStackScreen}
options={{
tabBarIcon: ({color}) => (
<Feather name="user" size={27} color={color} />
),
}}
/>
<Tab.Screen
name="History"
component={FavouriteStackScreen}
options={{
tabBarIcon: ({color}) => (
<MaterialCommunityIcons name="history" size={26} color={color} />
),
}}
/>
</Tab.Navigator>
);
}
function App() {
return (
<NavigationContainer>
<Drawer.Navigator
drawerContent={(props: any) => <DrawerContent {...props} />}>
<Drawer.Screen name="Home" component={mainTab} />
<Drawer.Screen name="Search" component={SearchStackScreen} />
{/* <Drawer.Screen name="Favourite" component={FavouriteStackScreen} />
<Drawer.Screen name="Profile" component={ProfileStackScreen} /> */}
</Drawer.Navigator>
</NavigationContainer>
);
}
export default App;