diff --git a/docs/api/navigators/TabNavigator.md b/docs/api/navigators/TabNavigator.md index 07d5827c..733f26c5 100644 --- a/docs/api/navigators/TabNavigator.md +++ b/docs/api/navigators/TabNavigator.md @@ -136,6 +136,7 @@ tabBarOptions: { - `tabStyle` - style object for the tab - `indicatorStyle` - style object for the tab indicator (line at the bottom of the tab) - `labelStyle` - style object for the tab label +- `iconStyle` - style object for the tab icon - `style` - style object for the tab bar Example: diff --git a/src/views/TabView/TabBarTop.js b/src/views/TabView/TabBarTop.js index f895c288..6d1130b0 100644 --- a/src/views/TabView/TabBarTop.js +++ b/src/views/TabView/TabBarTop.js @@ -37,6 +37,7 @@ type Props = { getLabel: (scene: TabScene) => ?(React.Element<*> | string); renderIcon: (scene: TabScene) => React.Element<*>; labelStyle?: Style; + iconStyle?: Style; }; export default class TabBarTop extends PureComponent { @@ -99,6 +100,7 @@ export default class TabBarTop extends PureComponent inactiveTintColor, renderIcon, showIcon, + iconStyle, } = this.props; if (showIcon === false) { return null; @@ -111,7 +113,7 @@ export default class TabBarTop extends PureComponent inactiveTintColor={inactiveTintColor} renderIcon={renderIcon} scene={scene} - style={styles.icon} + style={[styles.icon, iconStyle]} /> ); };