Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add onLeft and leftTitle to match onRight, rightTitle
  • Loading branch information
lrettig committed Jan 12, 2016
commit 5c6f76ce1eb4b6e82565f367142cf78a33604d91
10 changes: 10 additions & 0 deletions ExRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ export class ExRouteAdapter {
}

renderLeftButton(navigator, index, state){
if (this.route.props.onLeft && this.route.props.leftTitle) {
return (<TouchableOpacity
touchRetentionOffset={ExNavigator.Styles.barButtonTouchRetentionOffset}
onPress={() => this.route.props.onLeft({...this.route.props, ...this.props})}
style={[ExNavigator.Styles.barLeftButton, this.route.props.leftButtonStyle]}>
<Text
style={[ExNavigator.Styles.barLeftButtonText, this.route.props.leftButtonTextStyle]}>{this.route.props.leftTitle}</Text>
</TouchableOpacity>);
}

if (index === 0 || index < navigator.getCurrentRoutes().length-1) {
return null;
}
Expand Down