-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNav.js
55 lines (49 loc) · 1.2 KB
/
Nav.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
import React from 'react'
import { Image } from 'react-native'
import { TabNavigator } from 'react-navigation'
import CitiesNav from './tabs/Cities/CitiesNav'
import AddCity from './tabs/AddCity/AddCity'
import { colors } from './theme'
const Tabs = {
Cities: {
screen: CitiesNav,
navigationOptions: {
tabBarLabel: 'Cities',
tabBarIcon: (props) => (
<Image
source={require('./assets/cityicon.png')}
style={{ width: 28, height: 28, tintColor: props.tintColor }}
/>
)
}
},
AddCity: {
screen: AddCity,
navigationOptions: {
tabBarLabel: 'Add City',
tabBarIcon: (props) => (
<Image
source={require('./assets/addicon.png')}
style={{ width: 28, height: 28, tintColor: props.tintColor }}
/>
)
}
}
}
const TabConfig = {
tabBarOptions: {
activeTintColor: colors.primary,
inactiveTintColor: colors.secondary,
showIcon: true,
indicatorStyle: {
backgroundColor: colors.secondary
},
style: {
backgroundColor: '#fafafa',
borderTopWidth: 1,
borderTopColor: '#ededed'
}
},
tabBarPosition: 'bottom'
}
export default TabNavigator(Tabs, TabConfig)