mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-06 17:34:59 +08:00
Apply horizontal icon style whenever we should use horizontal tabs in icon
This commit is contained in:
@@ -124,6 +124,9 @@ const StacksInTabs = createTabNavigator(
|
||||
tabBarPosition: 'bottom',
|
||||
animationEnabled: false,
|
||||
swipeEnabled: false,
|
||||
tabBarOptions: {
|
||||
showLabel: false,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -109,11 +109,10 @@ class TabBarBottom extends React.PureComponent {
|
||||
inactiveTintColor={inactiveTintColor}
|
||||
renderIcon={renderIcon}
|
||||
scene={scene}
|
||||
style={
|
||||
showLabel && this._shouldUseHorizontalTabs()
|
||||
? styles.horizontalIcon
|
||||
: styles.icon
|
||||
}
|
||||
style={[
|
||||
styles.icon,
|
||||
this._shouldUseHorizontalTabs() && styles.horizontalIcon,
|
||||
]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user