mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
[TabBarIOS] Add translucent property to TabBarIOS
Summary:
To be on par with NavigatorIOS, I added the translucent property to TabBarIOS.
Usage:
```
<TabBarIOS
translucent={false} // default is true
/>
```
Closes https://github.com/facebook/react-native/pull/1937
Github Author: Jean Regisser <jean.regisser@gmail.com>
This commit is contained in:
@@ -32,7 +32,11 @@ var TabBarIOS = React.createClass({
|
||||
/**
|
||||
* Background color of the tab bar
|
||||
*/
|
||||
barTintColor: React.PropTypes.string
|
||||
barTintColor: React.PropTypes.string,
|
||||
/**
|
||||
* A Boolean value that indicates whether the tab bar is translucent
|
||||
*/
|
||||
translucent: React.PropTypes.bool,
|
||||
},
|
||||
|
||||
render: function() {
|
||||
@@ -40,7 +44,8 @@ var TabBarIOS = React.createClass({
|
||||
<RCTTabBar
|
||||
style={[styles.tabGroup, this.props.style]}
|
||||
tintColor={this.props.tintColor}
|
||||
barTintColor={this.props.barTintColor}>
|
||||
barTintColor={this.props.barTintColor}
|
||||
translucent={this.props.translucent !== false}>
|
||||
{this.props.children}
|
||||
</RCTTabBar>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user