Add iconStyle prop to tabBarOptions for TabBarTop (#965)

This commit is contained in:
Navid Taha
2017-04-08 20:02:52 +02:00
committed by Satyajit Sahoo
parent 6978ceec85
commit 96a34db809
2 changed files with 4 additions and 1 deletions

View File

@@ -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<DefaultProps, Props, void> {
@@ -99,6 +100,7 @@ export default class TabBarTop extends PureComponent<DefaultProps, Props, void>
inactiveTintColor,
renderIcon,
showIcon,
iconStyle,
} = this.props;
if (showIcon === false) {
return null;
@@ -111,7 +113,7 @@ export default class TabBarTop extends PureComponent<DefaultProps, Props, void>
inactiveTintColor={inactiveTintColor}
renderIcon={renderIcon}
scene={scene}
style={styles.icon}
style={[styles.icon, iconStyle]}
/>
);
};