mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
Update NavigatorIOS.ios.js
Summary: Allow props passed to the route object to overwrite props passed to the navigator. Closes https://github.com/facebook/react-native/pull/5101 Reviewed By: svcscm Differential Revision: D2799379 Pulled By: androidtrunkagent fb-gh-sync-id: 147b6ba4b309657f03d7bda38f8958c4599c38c3
This commit is contained in:
parent
68147cf39c
commit
86af597c2e
@ -172,6 +172,11 @@ type Event = Object;
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Props passed to the NavigatorIOS component will set the default configuration
|
||||
* for the navigation bar. Props passed as properties to a route object will set
|
||||
* the configuration for that route's navigation bar, overriding any props
|
||||
* passed to the NavigatorIOS component.
|
||||
*
|
||||
*/
|
||||
var NavigatorIOS = React.createClass({
|
||||
|
||||
@ -248,15 +253,45 @@ var NavigatorIOS = React.createClass({
|
||||
*/
|
||||
wrapperStyle: View.propTypes.style,
|
||||
|
||||
/**
|
||||
* A Boolean value that indicates whether the navigation bar is hidden
|
||||
*/
|
||||
navigationBarHidden: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* A Boolean value that indicates whether to hide the 1px hairline shadow
|
||||
*/
|
||||
shadowHidden: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* The color used for buttons in the navigation bar
|
||||
*/
|
||||
tintColor: PropTypes.string,
|
||||
|
||||
/**
|
||||
* The background color of the navigation bar
|
||||
*/
|
||||
barTintColor: PropTypes.string,
|
||||
|
||||
/**
|
||||
* The text color of the navigation bar title
|
||||
*/
|
||||
titleTextColor: PropTypes.string,
|
||||
|
||||
/**
|
||||
* A Boolean value that indicates whether the navigation bar is translucent
|
||||
*/
|
||||
translucent: PropTypes.bool,
|
||||
|
||||
}).isRequired,
|
||||
|
||||
/**
|
||||
* A Boolean value that indicates whether the navigation bar is hidden
|
||||
* A Boolean value that indicates whether the navigation bar is hidden by default
|
||||
*/
|
||||
navigationBarHidden: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* A Boolean value that indicates whether to hide the 1px hairline shadow
|
||||
* A Boolean value that indicates whether to hide the 1px hairline shadow by default
|
||||
*/
|
||||
shadowHidden: PropTypes.bool,
|
||||
|
||||
@ -267,22 +302,22 @@ var NavigatorIOS = React.createClass({
|
||||
itemWrapperStyle: View.propTypes.style,
|
||||
|
||||
/**
|
||||
* The color used for buttons in the navigation bar
|
||||
* The default color used for buttons in the navigation bar
|
||||
*/
|
||||
tintColor: PropTypes.string,
|
||||
|
||||
/**
|
||||
* The background color of the navigation bar
|
||||
* The default background color of the navigation bar
|
||||
*/
|
||||
barTintColor: PropTypes.string,
|
||||
|
||||
/**
|
||||
* The text color of the navigation bar title
|
||||
* The default text color of the navigation bar title
|
||||
*/
|
||||
titleTextColor: PropTypes.string,
|
||||
|
||||
/**
|
||||
* A Boolean value that indicates whether the navigation bar is translucent
|
||||
* A Boolean value that indicates whether the navigation bar is translucent by default
|
||||
*/
|
||||
translucent: PropTypes.bool,
|
||||
|
||||
@ -610,8 +645,8 @@ var NavigatorIOS = React.createClass({
|
||||
return (
|
||||
<StaticContainer key={'nav' + i} shouldUpdate={shouldUpdateChild}>
|
||||
<RCTNavigatorItem
|
||||
{...route}
|
||||
{...props}
|
||||
{...route}
|
||||
style={[
|
||||
styles.stackItem,
|
||||
itemWrapperStyle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user