Add subviewStyle prop to NavigationHeader
Summary: Implements: #7204 Pinging ericvicenti for review. Closes https://github.com/facebook/react-native/pull/7214 Differential Revision: D3219306 Pulled By: ericvicenti fb-gh-sync-id: becd1dada2557b7fb2c345bac2098094fa6d2144 fbshipit-source-id: becd1dada2557b7fb2c345bac2098094fa6d2144
This commit is contained in:
parent
c5307a6e7c
commit
1dc82a9e5f
|
@ -65,6 +65,7 @@ type Props = NavigationSceneRendererProps & {
|
||||||
renderRightComponent: NavigationSceneRenderer,
|
renderRightComponent: NavigationSceneRenderer,
|
||||||
renderTitleComponent: NavigationSceneRenderer,
|
renderTitleComponent: NavigationSceneRenderer,
|
||||||
style?: any;
|
style?: any;
|
||||||
|
subviewStyle?: any;
|
||||||
viewProps?: any;
|
viewProps?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,6 +101,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
||||||
renderRightComponent: PropTypes.func,
|
renderRightComponent: PropTypes.func,
|
||||||
renderTitleComponent: PropTypes.func,
|
renderTitleComponent: PropTypes.func,
|
||||||
style: View.propTypes.style,
|
style: View.propTypes.style,
|
||||||
|
subviewStyle: View.propTypes.style,
|
||||||
viewProps: PropTypes.shape(View.propTypes),
|
viewProps: PropTypes.shape(View.propTypes),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -186,6 +188,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { subviewStyle } = this.props;
|
||||||
const pointerEvents = offset !== 0 || isStale ? 'none' : 'box-none';
|
const pointerEvents = offset !== 0 || isStale ? 'none' : 'box-none';
|
||||||
return (
|
return (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
|
@ -194,6 +197,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
||||||
style={[
|
style={[
|
||||||
styles[name],
|
styles[name],
|
||||||
styleInterpolator(props),
|
styleInterpolator(props),
|
||||||
|
subviewStyle[name],
|
||||||
]}>
|
]}>
|
||||||
{subView}
|
{subView}
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
|
|
Loading…
Reference in New Issue