Skip to content

Commit

Permalink
Enable setting custom styles on scenes stack
Browse files Browse the repository at this point in the history
Summary: There's scenarios where you might want to retain transparency behind the header, but have a solid background for the scene stack and its transitions.

Reviewed By: ericvicenti, dwwoelfel

Differential Revision: D4471681

fbshipit-source-id: 529e999b96b02a00e8d625169989dda49fb3ddaa
  • Loading branch information
oyvindkinsey authored and nicktate committed Feb 9, 2017
1 parent 9e6f441 commit 35b0a45
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -68,6 +68,7 @@ type Props = {
gestureResponseDistance?: ?number,
enableGestures: ?boolean,
cardStyleInterpolator?: ?NavigationStyleInterpolator,
scenesStyle?: any,
};

type DefaultProps = {
Expand Down Expand Up @@ -202,6 +203,11 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
* Custom style applied to the cards stack.
*/
style: View.propTypes.style,

/**
* Custom style applied to the scenes stack.
*/
scenesStyle: View.propTypes.style,
};

static defaultProps: DefaultProps = {
Expand Down Expand Up @@ -264,7 +270,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
return (
<View style={styles.container}>
<View
style={styles.scenes}>
style={[styles.scenes, this.props.scenesStyle]}>
{scenes}
</View>
{header}
Expand Down

0 comments on commit 35b0a45

Please sign in to comment.