mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 22:47:02 +08:00
Add iconStyle prop to tabBarOptions for TabBarTop (#965)
This commit is contained in:
committed by
Satyajit Sahoo
parent
6978ceec85
commit
96a34db809
@@ -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]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user