Skip to content

Instantly share code, notes, and snippets.

@youneshenniwrites
Created January 15, 2019 11:39
Show Gist options
  • Save youneshenniwrites/5de1f1d391108025078fa4628273fd26 to your computer and use it in GitHub Desktop.
Save youneshenniwrites/5de1f1d391108025078fa4628273fd26 to your computer and use it in GitHub Desktop.
Tabs design in the Auth stack of RNAuthAWS
// Configurations and options for the AppTabNavigator
const configurations = {
Home: {
screen: HomeScreen,
navigationOptions: {
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-home" style={{fontSize: 26, color: tintColor}} />
)
}
},
Profile: {
screen: ProfileScreen,
navigationOptions: {
tabBarLabel: 'Profile',
tabBarIcon: ({tintColor}) => (
<Icon name="ios-person" style={{fontSize: 26, color: tintColor}} />
)
}
},
Settings: {
screen: SettingsScreen,
navigationOptions: {
tabBarLabel: 'Settings',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-settings" style={{fontSize: 26, color: tintColor}} />
)
}
},
}
const options = {
tabBarPosition: 'bottom',
swipeEnabled: true,
animationEnabled: true,
navigationOptions: {
tabBarVisible: true
},
tabBarOptions: {
showLabel: true,
activeTintColor: '#fff',
inactiveTintColor: '#a8abaf',
style: {
backgroundColor: '#667292',
borderTopWidth: 1,
borderTopColor: '#ff99',//'#667292',
paddingBottom: 0
},
labelStyle: {
fontSize: 12,
fontWeight: 'bold',
marginBottom: 12,
marginTop:12,
},
indicatorStyle: {
height: 0,
},
showIcon: true,
}
}
// Bottom App tabs
const AppTabNavigator = createMaterialTopTabNavigator(configurations, options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment