-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainNavigator.js
92 lines (90 loc) · 2.75 KB
/
MainNavigator.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import React, { Component } from 'react';
import { createAppContainer } from 'react-navigation';
import { createBottomTabNavigator, createMaterialTopTabNavigator } from 'react-navigation-tabs';
import { Icon } from 'react-native-elements';
import AuthScreen from './src/screens/AuthScreen';
import WelcomeScreen from './src/screens/WelcomeScreen';
import MapScreen from './src/screens/MapScreen';
import DeckScreen from './src/screens/DeckScreen';
import ReviewScreen from './src/screens/ReviewScreen';
import SettingsScreen from './src/screens/SettingsScreen';
const MainNavigator = createBottomTabNavigator({
welcome: {
screen: WelcomeScreen,
navigationOptions: {
tabBarVisible: false
}
},
auth: {
screen: AuthScreen,
navigationOptions: {
tabBarVisible: false
}
},
main: {
screen: createMaterialTopTabNavigator({
map: {
screen:MapScreen,
navigationOptions: {
tabBarIcon: ({ focused, tintColor }) => {
const iconName = `map${focused ? '' : '-outline'}`;
return <Icon type="material-community" name={iconName} size={24} color={tintColor} />;
}
}
},
jobs: {
screen: DeckScreen,
navigationOptions: {
tabBarIcon: ({ focused, tintColor }) => {
const iconName = `cards${focused ? '' : '-outline'}`;
return <Icon type="material-community" name={iconName} size={24} color={tintColor} />;
}
}
},
saved: {
screen: ReviewScreen,
navigationOptions: {
tabBarIcon: ({ focused, tintColor }) => {
const iconName = `heart${focused ? '' : 'o'}`;
return <Icon type="antdesign" name={iconName} size={24} color={tintColor} />;
}
}
},
profile: {
screen: SettingsScreen,
navigationOptions: {
tabBarIcon: ({ focused, tintColor }) => {
const iconName = `user-circle${focused ? '' : '-o'}`;
return <Icon type="font-awesome" name={iconName} size={24} color={tintColor} />;
}
}
}
},{
tabBarOptions: {
activeTintColor: '#03A9F4',
inactiveTintColor: '#b0b0b0',
showIcon: true,
indicatorStyle: {
height: null
},
pressColor: '#d6e6ff',
labelStyle: {
fontSize: 12,
marginBottom: 5,
fontFamily: 'google-sans',
textTransform:'uppercase'
},
style: {
backgroundColor: '#fff',
height: 60
},
},
tabBarPosition: 'bottom',
swipeEnabled: true
}),
navigationOptions: {
tabBarVisible: false
},
}
});
export default createAppContainer(MainNavigator);