mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 12:55:21 +08:00
fix: remove broken showIcon option from bottom-tabs
This commit is contained in:
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user