Created
August 20, 2017 19:30
-
-
Save brookslyrette/cb518e4f15e13d70280e380f484c72e7 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
| import React from 'react'; | |
| import { StyleSheet, Text, View } from 'react-native'; | |
| import { StackNavigator } from 'react-navigation'; | |
| const Screen1 = () => (<View style={styles.container}><Text>Screen 1</Text></View>) | |
| const Screen2 = () => (<View style={styles.container}><Text>Screen 2</Text></View>) | |
| const Screen3 = () => (<View style={styles.container}><Text>Screen 3</Text></View>) | |
| const Navigator = StackNavigator({ | |
| Screen1: { screen: Screen1 }, | |
| Screen2: { screen: Screen2 }, | |
| Screen3: { screen: Screen3 }, | |
| }, { | |
| navigationOptions: { | |
| headerTitle: 'Default App Title', | |
| headerTitleStyle: { | |
| color: '#FFF' | |
| }, | |
| headerStyle: { | |
| backgroundColor: '#f57c00' | |
| }, | |
| headerBackTitle: null, | |
| headerTintColor: '#FFF', | |
| } | |
| }); | |
| export default class App extends React.Component { | |
| render() { | |
| return ( | |
| <Navigator/> | |
| ); | |
| } | |
| } | |
| const styles = StyleSheet.create({ | |
| container: { | |
| flex: 1, | |
| backgroundColor: '#fff', | |
| alignItems: 'center', | |
| justifyContent: 'center', | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment