diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js b/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js index 064986f91..a0b1e78a1 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js @@ -65,6 +65,7 @@ type Props = NavigationSceneRendererProps & { renderRightComponent: NavigationSceneRenderer, renderTitleComponent: NavigationSceneRenderer, style?: any; + viewProps?: any; }; type SubViewName = 'left' | 'title' | 'right'; @@ -99,6 +100,7 @@ class NavigationHeader extends React.Component { renderRightComponent: PropTypes.func, renderTitleComponent: PropTypes.func, style: View.propTypes.style, + viewProps: PropTypes.shape(View.propTypes), }; shouldComponentUpdate(nextProps: Props, nextState: any): boolean { @@ -110,7 +112,7 @@ class NavigationHeader extends React.Component { } render(): ReactElement { - const { scenes, style } = this.props; + const { scenes, style, viewProps } = this.props; const scenesProps = scenes.map(scene => { const props = NavigationPropTypes.extractSceneRendererProps(this.props); @@ -119,7 +121,7 @@ class NavigationHeader extends React.Component { }); return ( - + {scenesProps.map(this._renderLeft, this)} {scenesProps.map(this._renderTitle, this)} {scenesProps.map(this._renderRight, this)} diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js b/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js index 282f1df9c..1f4e14b5d 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js @@ -41,10 +41,11 @@ type Props = { children: ReactElement; style: any; textStyle: any; + viewProps: any; } -const NavigationHeaderTitle = ({ children, style, textStyle }: Props) => ( - +const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => ( + {children} );