Skip to content

Commit

Permalink
Support headerBackTitleVisible and cadrStyle options. (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Nov 29, 2019
1 parent 4f8efd2 commit 4169fad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions createNativeStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class StackView extends React.Component {
headerTitleStyle,
headerBackTitleStyle,
headerBackTitle,
headerBackTitleVisible,
headerTintColor,
gestureEnabled,
largeTitle,
Expand All @@ -69,7 +70,7 @@ class StackView extends React.Component {
titleFontFamily: headerTitleStyle && headerTitleStyle.fontFamily,
titleColor: headerTintColor,
titleFontSize: headerTitleStyle && headerTitleStyle.fontSize,
backTitle: headerBackTitle,
backTitle: headerBackTitleVisible === false ? '' : headerBackTitle,
backTitleFontFamily:
headerBackTitleStyle && headerBackTitleStyle.fontFamily,
backTitleFontSize: headerBackTitleStyle && headerBackTitleStyle.fontSize,
Expand Down Expand Up @@ -154,7 +155,7 @@ class StackView extends React.Component {
};

_renderScene = (index, route, descriptor) => {
const { navigation, getComponent } = descriptor;
const { navigation, getComponent, options } = descriptor;
const { mode, transparentCard } = this.props.navigationConfig;
const SceneComponent = getComponent();

Expand All @@ -167,7 +168,7 @@ class StackView extends React.Component {
return (
<Screen
key={`screen_${route.key}`}
style={StyleSheet.absoluteFill}
style={options.cardStyle}
stackPresentation={stackPresentation}
onDismissed={() => this._removeScene(route)}>
{this._renderHeaderConfig(index, route, descriptor)}
Expand Down

0 comments on commit 4169fad

Please sign in to comment.