mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 00:20:31 +00:00
Enable setting custom styles on scenes stack
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
This commit is contained in:
parent
7e869b9d0a
commit
2cfb3f1f8f
@ -68,6 +68,7 @@ type Props = {
|
||||
gestureResponseDistance?: ?number,
|
||||
enableGestures: ?boolean,
|
||||
cardStyleInterpolator?: ?NavigationStyleInterpolator,
|
||||
scenesStyle?: any,
|
||||
};
|
||||
|
||||
type DefaultProps = {
|
||||
@ -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 = {
|
||||
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user