diff --git a/app/component-library/components/Navigation/TabBar/TabBar.constants.ts b/app/component-library/components/Navigation/TabBar/TabBar.constants.ts index 38e96d6d39e..3b389a7b7b2 100644 --- a/app/component-library/components/Navigation/TabBar/TabBar.constants.ts +++ b/app/component-library/components/Navigation/TabBar/TabBar.constants.ts @@ -2,7 +2,7 @@ // Third party dependencies. import { IconName } from '../../Icons/Icon'; - +import Device from '../../../../util/device'; // Internal dependencies. import { IconByTabBarIconKey, TabBarIconKey } from './TabBar.types'; @@ -13,3 +13,5 @@ export const ICON_BY_TAB_BAR_ICON_KEY: IconByTabBarIconKey = { [TabBarIconKey.Activity]: IconName.Activity, [TabBarIconKey.Setting]: IconName.Setting, }; + +export const TAB_BAR_HEIGHT = Device.isAndroid() ? 62 : 48; diff --git a/app/component-library/components/Navigation/TabBar/TabBar.styles.ts b/app/component-library/components/Navigation/TabBar/TabBar.styles.ts index f74fed8b87c..bbfbad0763b 100644 --- a/app/component-library/components/Navigation/TabBar/TabBar.styles.ts +++ b/app/component-library/components/Navigation/TabBar/TabBar.styles.ts @@ -7,7 +7,7 @@ import Device from '../../../../util/device'; // Internal dependencies. import { TabBarStyleSheetVars } from './TabBar.types'; - +import { TAB_BAR_HEIGHT } from './TabBar.constants'; /** * Style sheet function for TabBar component. * @@ -39,7 +39,7 @@ const styleSheet = (params: { vars: TabBarStyleSheetVars; theme: Theme }) => { base: { flexDirection: 'row', alignItems: 'center', - height: Device.isAndroid() ? 62 : 48, + height: TAB_BAR_HEIGHT, paddingHorizontal: 16, marginBottom: bottomInset, backgroundColor: colors.background.default, diff --git a/app/component-library/components/Toast/Toast.tsx b/app/component-library/components/Toast/Toast.tsx index 170b7543897..8c23d38b46d 100644 --- a/app/component-library/components/Toast/Toast.tsx +++ b/app/component-library/components/Toast/Toast.tsx @@ -40,6 +40,7 @@ import { import styles from './Toast.styles'; import { ToastSelectorsIDs } from '../../../../e2e/selectors/wallet/ToastModal.selectors'; import { ButtonProps } from '../Buttons/Button/Button.types'; +import { TAB_BAR_HEIGHT } from '../Navigation/TabBar/TabBar.constants'; const visibilityDuration = 2750; const animationDuration = 250; @@ -53,7 +54,7 @@ const Toast = forwardRef((_, ref: React.ForwardedRef) => { const { bottom: bottomNotchSpacing } = useSafeAreaInsets(); const translateYProgress = useSharedValue(screenHeight); const animatedStyle = useAnimatedStyle(() => ({ - transform: [{ translateY: translateYProgress.value }], + transform: [{ translateY: translateYProgress.value - TAB_BAR_HEIGHT }], })); const baseStyle: StyleProp>> = useMemo(