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,
|
||||
renderTitleComponent: NavigationSceneRenderer,
|
||||
style?: any;
|
||||
subviewStyle?: any;
|
||||
viewProps?: any;
|
||||
};
|
||||
|
||||
|
@ -100,6 +101,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
|||
renderRightComponent: PropTypes.func,
|
||||
renderTitleComponent: PropTypes.func,
|
||||
style: View.propTypes.style,
|
||||
subviewStyle: View.propTypes.style,
|
||||
viewProps: PropTypes.shape(View.propTypes),
|
||||
};
|
||||
|
||||
|
@ -186,6 +188,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
|||
return null;
|
||||
}
|
||||
|
||||
const { subviewStyle } = this.props;
|
||||
const pointerEvents = offset !== 0 || isStale ? 'none' : 'box-none';
|
||||
return (
|
||||
<Animated.View
|
||||
|
@ -194,6 +197,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
|||
style={[
|
||||
styles[name],
|
||||
styleInterpolator(props),
|
||||
subviewStyle[name],
|
||||
]}>
|
||||
{subView}
|
||||
</Animated.View>
|
||||
|
|
Loading…
Reference in New Issue