forked from corymsmith/react-native-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SMXTabBarIOS.ios.js
48 lines (42 loc) · 1.07 KB
/
SMXTabBarIOS.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
*
* @providesModule SMXTabBarIOS
* @flow
*/
'use strict';
var React = require('React');
var ReactIOSViewAttributes = require('ReactIOSViewAttributes');
var SMXTabBarIconItemIOS = require('SMXTabBarItemIOS');
var StyleSheet = require('StyleSheet');
var merge = require('merge');
var createReactIOSNativeComponentClass = require('createReactIOSNativeComponentClass');
var SMXTabBarIOS = React.createClass({
statics: {
Item: SMXTabBarIconItemIOS,
},
render: function () {
var NativeProps = {
tintColor : this.props.tintColor,
barTintColor : this.props.barTintColor
};
return (
<SMXIconTabBar style={[styles.tabGroup, this.props.style]} {...NativeProps}>
{this.props.children}
</SMXIconTabBar>
);
}
});
var styles = StyleSheet.create({
tabGroup: {
flex: 1
}
});
var config = {
validAttributes: merge(ReactIOSViewAttributes.UIView, {
tintColor: true,
barTintColor: true
}),
uiViewClassName: 'SMXTabBar',
};
var SMXIconTabBar = createReactIOSNativeComponentClass(config);
module.exports = SMXTabBarIOS;