Skip to content

Instantly share code, notes, and snippets.

@joegaudet
Created April 28, 2020 22:40
Show Gist options
  • Save joegaudet/cd4be1be22835e1f48018ca4bb418a54 to your computer and use it in GitHub Desktop.
Save joegaudet/cd4be1be22835e1f48018ca4bb418a54 to your computer and use it in GitHub Desktop.
function ManifestNavigator({navigation, route}) {
const params = route ? route.params : {};
return (
<Stack.Navigator>
<Stack.Screen
name="Home"
component={Home}
options={{
headerStyle: {
backgroundColor: Colors.FOODEE_RED,
},
headerTintColor: 'white',
title: 'Orders for Today',
headerLeft: () => (
<TouchableOpacity
style={{padding: 10}}
onPress={() => navigation.openDrawer()}>
<Icon name="bars" size={20} color="white" type="font-awesome" />
</TouchableOpacity>
),
}}
/>
<Stack.Screen
name="Dropoff"
component={Dropoff}
options={{
title: params.title,
headerStyle: {
backgroundColor: Colors.DROPOFF,
},
headerTintColor: 'white',
}}
/>
<Stack.Screen
name="Pickup"
component={Pickup}
options={{
title: params.title,
headerStyle: {
backgroundColor: Colors.PICKUP,
},
headerTintColor: 'white',
}}
/>
</Stack.Navigator>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment