Skip to content

Instantly share code, notes, and snippets.

@janhesters
Last active September 23, 2018 08:47
Show Gist options
  • Save janhesters/9bc42c6bcb119b30c8a1734691ce247c to your computer and use it in GitHub Desktop.
Save janhesters/9bc42c6bcb119b30c8a1734691ce247c to your computer and use it in GitHub Desktop.
// ... amend this code to the HomeStack's navigationOptions
HomeStack.navigationOptions = ({ navigation }: NavigationScreenProps) => {
let drawerLockMode = "unlocked";
if (navigation.state.index > 0) {
drawerLockMode = "locked-closed";
}
return {
tabBarLabel: "Home",
tabBarIcon: ({ tintColor }: TabScene) => (
<Icon name="ios-home" type="ionicon" color={tintColor} />
),
drawerLockMode,
drawerLabel: "Home",
drawerIcon: ({ tintColor }: TabScene) => (
<Icon name="md-home" type="ionicon" color={tintColor} />
)
};
};
// ... rest of Navigator.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment