react-native-tab-navigator
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "react-native-tab-navigator", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "A tab bar that switches between scenes, written in JS for cross-platform support", | ||
@@ -5,0 +5,0 @@ "main": "TabNavigator.js", |
@@ -34,3 +34,6 @@ 'use strict'; | ||
let { title, badge } = this.props; | ||
let icon = React.Children.only(this.props.children); | ||
let icon = null; | ||
if (React.Children.count(this.props.children) > 0) { | ||
icon = React.Children.only(this.props.children); | ||
} | ||
@@ -37,0 +40,0 @@ if (title) { |
@@ -13,3 +13,3 @@ 'use strict'; | ||
static propTypes = { | ||
renderIcon: PropTypes.func.isRequired, | ||
renderIcon: PropTypes.func, | ||
renderSelectedIcon: PropTypes.func, | ||
@@ -28,3 +28,2 @@ badgeText: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
static defaultProps = { | ||
renderIcon: () => <View />, | ||
}; | ||
@@ -31,0 +30,0 @@ |
14825
418