Last active
February 24, 2016 16:11
-
-
Save ide/bed6675333e97046d571 to your computer and use it in GitHub Desktop.
Simple example of an ExRoute object
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
let homeRoute = { | |
getSceneClass() { | |
return require('./HomeScreen'); | |
}, | |
getTitle() { | |
return 'Home', | |
}, | |
renderLeftButton(navigator) { | |
return ( | |
<TouchableOpacity | |
touchRetentionOffset={ExNavigator.Styles.barButtonTouchRetentionOffset} | |
onPress={() => navigator.push(getSettingsRoute())} | |
style={ExNavigator.Styles.barLeftButton}> | |
<Text style={ExNavigator.Styles.barLeftButtonText}>Settings<Text/> | |
</TouchableOpacity> | |
); | |
}, | |
renderRightButton(navigator) { | |
return ( | |
<TouchableOpacity | |
touchRetentionOffset={ExNavigator.Styles.barButtonTouchRetentionOffset} | |
onPress={() => navigator.push(getHelpRoute())} | |
style={ExNavigator.Styles.barRightButton}> | |
<Text style={ExNavigator.Styles.barRightButtonText}>Help<Text/> | |
</TouchableOpacity> | |
); | |
}, | |
configureScene() { | |
return ExNavigator.SceneConfigs.FloatFromRight; | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typo on lines 16 and 27. Should be
</Text>
instead of<Text/>
.