Apply horizontal icon style whenever we should use horizontal tabs in icon

This commit is contained in:
Brent Vatne
2018-03-14 21:30:04 -07:00
parent f67872d8f1
commit 6475e32dba
2 changed files with 7 additions and 5 deletions

View File

@@ -124,6 +124,9 @@ const StacksInTabs = createTabNavigator(
tabBarPosition: 'bottom',
animationEnabled: false,
swipeEnabled: false,
tabBarOptions: {
showLabel: false,
},
}
);

View File

@@ -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,
]}
/>
);
};