Last active
September 21, 2018 09:15
-
-
Save janhesters/cd6fe6e74673afa1efdf7b9fe9244dee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... 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