-
Notifications
You must be signed in to change notification settings - Fork 0
/
nav.js
43 lines (39 loc) · 1.1 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
import {TabNavigator, TabView} from 'react-navigation'
import HomeNav from './homeNav'
import Icon from 'react-native-vector-icons/FontAwesome'
import {Platform} from 'react-native'
import ProfileNav from './profileNav'
import React from 'react'
const Nav = TabNavigator({
Home: {
screen: HomeNav,
navigationOptions: {
tabBar: {
label: 'Home',
icon : ({tintColor}) => <Icon name='home' size={20} style={{color: tintColor}} />
}
}
},
Profile: {
screen: ProfileNav,
navigationOptions: {
tabBar: ({state}) => ({
label : 'Profile',
icon : ({tintColor}) => <Icon name='user' size={20} style={{color: tintColor}} />,
visible: state.routes.length > 1 ? false : true,
})
}
}
},
// Tab bar customization:
{
// swipeEnabled : false,
tabBarComponent: Platform.select({android: TabView.TabBarTop, ios: TabView.TabBarBottom}),
tabBarPosition : 'bottom',
tabBarOptions: {
indicator: {backgroundColor: 'transparent'},
showIcon : true,
showLabel: Platform.select({android: false, ios: true}),
}
})
export default Nav