fix: remove broken showIcon option from bottom-tabs

This commit is contained in:
Satyajit Sahoo
2020-06-22 12:05:05 +02:00
parent ea5affd914
commit 16128199ed
3 changed files with 3 additions and 14 deletions

View File

@@ -164,10 +164,6 @@ export type BottomTabBarOptions = {
* Whether the tab label should be visible. Defaults to `true`.
*/
showLabel?: boolean;
/**
* Whether the tab icon should be visible. Defaults to `true`.
*/
showIcon?: boolean;
/**
* Style object for the tab label.
*/
@@ -182,7 +178,7 @@ export type BottomTabBarOptions = {
tabStyle?: StyleProp<ViewStyle>;
/**
* Whether the label is rendered below the icon or beside the icon.
* By default, in `vertical` orinetation, label is rendered below and in `horizontal` orientation, it's rendered beside.
* By default, in `vertical` orientation, label is rendered below and in `horizontal` orientation, it's rendered beside.
*/
labelPosition?: LabelPosition;
/**

View File

@@ -46,7 +46,6 @@ export default function BottomTabBar({
labelStyle,
iconStyle,
safeAreaInsets,
showIcon,
showLabel,
style,
tabStyle,
@@ -284,7 +283,6 @@ export default function BottomTabBar({
button={options.tabBarButton}
icon={options.tabBarIcon}
label={label}
showIcon={showIcon}
showLabel={showLabel}
labelStyle={labelStyle}
iconStyle={iconStyle}

View File

@@ -90,10 +90,6 @@ type Props = {
* Whether to show the label text for the tab.
*/
showLabel?: boolean;
/**
* Whether to show the icon for the tab.
*/
showIcon?: boolean;
/**
* Whether to allow scaling the font for the label for accessibility purposes.
*/
@@ -169,7 +165,6 @@ export default function BottomTabBarItem({
activeBackgroundColor = 'transparent',
inactiveBackgroundColor = 'transparent',
showLabel = true,
showIcon = true,
allowFontScaling,
labelStyle,
iconStyle,
@@ -201,7 +196,7 @@ export default function BottomTabBarItem({
style={[
styles.label,
{ color },
showIcon && horizontal ? styles.labelBeside : styles.labelBeneath,
horizontal ? styles.labelBeside : styles.labelBeneath,
labelStyle,
]}
allowFontScaling={allowFontScaling}
@@ -215,7 +210,7 @@ export default function BottomTabBarItem({
};
const renderIcon = ({ focused }: { focused: boolean }) => {
if (showIcon === false || icon === undefined) {
if (icon === undefined) {
return null;
}