-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from GantMan/add_drawer_stacks
drawer stacks in place
- Loading branch information
Showing
8 changed files
with
188 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
export default class App extends React.Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>I am Forgotten Password | ||
</Text> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
export default class App extends React.Component { | ||
static navigationOptions = { | ||
drawerLabel: 'Screen One' | ||
} | ||
|
||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>Screen 1</Text> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
export default class App extends React.Component { | ||
static navigationOptions = { | ||
drawerLabel: 'Screen Two' | ||
} | ||
|
||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>Screen2</Text> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
export default class App extends React.Component { | ||
static navigationOptions = { | ||
drawerLabel: 'Screen Three' | ||
} | ||
|
||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>Screen3</Text> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
export default class App extends React.Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>I am Signup Screen</Text> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,56 @@ | ||
import { StackNavigator } from 'react-navigation' | ||
import React from 'react' | ||
import { Text } from 'react-native' | ||
import { StackNavigator, DrawerNavigator } from 'react-navigation' | ||
import LoginScreen from '../Containers/LoginScreen' | ||
import SignupScreen from '../Containers/SignupScreen' | ||
import ForgottenPasswordScreen from '../Containers/ForgottenPasswordScreen' | ||
import Screen1 from '../Containers/Screen1' | ||
import Screen2 from '../Containers/Screen2' | ||
import Screen3 from '../Containers/Screen3' | ||
|
||
// drawer stack | ||
const DrawerStack = DrawerNavigator({ | ||
screen1: { screen: Screen1 }, | ||
screen2: { screen: Screen2 }, | ||
screen3: { screen: Screen3 }, | ||
}, { | ||
gesturesEnabled: false | ||
}) | ||
|
||
const DrawerNavigation = StackNavigator({ | ||
DrawerStack: { screen: DrawerStack } | ||
}, { | ||
headerMode: 'float', | ||
navigationOptions: ({navigation}) => ({ | ||
headerStyle: {backgroundColor: 'green'}, | ||
title: 'Logged In to your app!', | ||
gesturesEnabled: false, | ||
headerLeft: <Text onPress={() => navigation.navigate('DrawerOpen')}>Menu</Text> | ||
}) | ||
}) | ||
|
||
// login stack | ||
const LoginStack = StackNavigator({ | ||
loginScreen: { screen: LoginScreen }, | ||
signupScreen: { screen: SignupScreen }, | ||
forgottenPasswordScreen: { screen: ForgottenPasswordScreen, navigationOptions: { title: 'Forgot Password' } } | ||
}, { | ||
headerMode: 'float', | ||
navigationOptions: { | ||
headerStyle: {backgroundColor: 'red'}, | ||
title: 'You are not logged in' | ||
} | ||
}) | ||
|
||
// Manifest of possible screens | ||
const PrimaryNav = StackNavigator({ | ||
LoginScreen: { screen: LoginScreen } | ||
loginStack: { screen: LoginStack }, | ||
drawerStack: { screen: DrawerNavigation } | ||
}, { | ||
// Default config for all screens | ||
headerMode: 'none', | ||
initialRouteName: 'LoginScreen' | ||
title: 'Main', | ||
initialRouteName: 'loginStack' | ||
}) | ||
|
||
export default PrimaryNav |