Skip to content

Commit 5a8bc91

Browse files
committed
Merge pull request #98 from LeoLeBras/backbutton-props
Add BackButton props
2 parents d7161fc + 87af4ea commit 5a8bc91

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/NavBarContent.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ class NavBarContent extends React.Component {
173173
);
174174
} else if (this.props.route.index > 0) {
175175
leftCornerContent = (
176-
<NavButton onPress={this.goBack} backButtonComponent={this.props.backButtonComponent} />
176+
<NavButton onPress={this.goBack } backButtonComponent={ () => {
177+
const BackButton = this.props.backButtonComponent;
178+
const backButtonProps = this.props.route.backButtonProps || {};
179+
return <BackButton {...backButtonProps} />;
180+
}} />
177181
);
178182
}
179183

0 commit comments

Comments
 (0)