Skip to content

Instantly share code, notes, and snippets.

@janhesters
Last active September 21, 2018 09:15
Show Gist options
  • Save janhesters/cd6fe6e74673afa1efdf7b9fe9244dee to your computer and use it in GitHub Desktop.
Save janhesters/cd6fe6e74673afa1efdf7b9fe9244dee to your computer and use it in GitHub Desktop.
// ... imports
import { Icon } from "react-native-elements";
// You only need NavigationScreenProps for TypeScript
import { NavigationScreenProps } from "react-navigation";
class HomeScreen extends Component {
static navigationOptions = ({ navigation }: NavigationScreenProps) => ({
headerTitle: "Home",
headerLeft: Platform.select({
ios: null,
android: (
<Icon
name="md-menu"
type="ionicon"
containerStyle={styles.icon}
onPress={() => navigation.toggleDrawer()}
/>
)
})
});
// ... rest of the component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment