From 5143b3ca3acd52c4ac15b4b423f85c160acceb73 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 9 May 2024 21:59:29 -0500 Subject: [PATCH] Replace icons in bottom bars --- src/view/shell/bottom-bar/BottomBar.tsx | 72 +++++++++---------- src/view/shell/bottom-bar/BottomBarStyles.tsx | 3 + src/view/shell/bottom-bar/BottomBarWeb.tsx | 60 ++++++++-------- 3 files changed, 69 insertions(+), 66 deletions(-) diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index 290943dd6a..08b6e8a633 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -13,15 +13,6 @@ import {useDedupe} from '#/lib/hooks/useDedupe' import {useMinimalShellMode} from '#/lib/hooks/useMinimalShellMode' import {useNavigationTabState} from '#/lib/hooks/useNavigationTabState' import {usePalette} from '#/lib/hooks/usePalette' -import { - BellIcon, - BellIconSolid, - HashtagIcon, - HomeIcon, - HomeIconSolid, - MagnifyingGlassIcon2, - MagnifyingGlassIcon2Solid, -} from '#/lib/icons' import {clamp} from '#/lib/numbers' import {getTabState, TabState} from '#/lib/routes/helpers' import {useGate} from '#/lib/statsig/statsig' @@ -41,6 +32,20 @@ import {Logo} from '#/view/icons/Logo' import {Logotype} from '#/view/icons/Logotype' import {useDialogControl} from '#/components/Dialog' import {SwitchAccountDialog} from '#/components/dialogs/SwitchAccount' +import { + Bell2_Filled_Corner0_Rounded as BellFilled, + Bell2_Stroke2_Corner0_Rounded as Bell, +} from '#/components/icons/Bell2' +import { + Hashtag_Filled_Corner0_Rounded as HashtagFilled, + Hashtag_Stroke2_Corner0_Rounded as Hashtag, +} from '#/components/icons/Hashtag' +import { + HomeOpen_Filled_Corner0_Rounded as HomeFilled, + HomeOpen_Stoke2_Corner0_Rounded as Home, +} from '#/components/icons/HomeOpen' +import {MagnifyingGlass_Filled_Stroke2_Corner0_Rounded as MagnifyingGlassFilled} from '#/components/icons/MagnifyingGlass' +import {MagnifyingGlass2_Stroke2_Corner0_Rounded as MagnifyingGlass} from '#/components/icons/MagnifyingGlass2' import { Message_Stroke2_Corner0_Rounded as Message, Message_Stroke2_Corner0_Rounded_Filled as MessageFilled, @@ -80,6 +85,7 @@ export function BottomBar({navigation}: BottomTabBarProps) { const accountSwitchControl = useDialogControl() const playHaptic = useHaptics() const gate = useGate() + const iconWidth = 30 const showSignIn = React.useCallback(() => { closeAllActiveElements() @@ -154,15 +160,13 @@ export function BottomBar({navigation}: BottomTabBarProps) { testID="bottomBarHomeBtn" icon={ isAtHome ? ( - ) : ( - ) @@ -176,16 +180,14 @@ export function BottomBar({navigation}: BottomTabBarProps) { testID="bottomBarSearchBtn" icon={ isAtSearch ? ( - ) : ( - ) } @@ -198,16 +200,14 @@ export function BottomBar({navigation}: BottomTabBarProps) { testID="bottomBarFeedsBtn" icon={ isAtFeeds ? ( - ) : ( - ) } @@ -220,15 +220,13 @@ export function BottomBar({navigation}: BottomTabBarProps) { testID="bottomBarNotificationsBtn" icon={ isAtNotifications ? ( - ) : ( - ) @@ -250,12 +248,12 @@ export function BottomBar({navigation}: BottomTabBarProps) { icon={ isAtMessages ? ( ) : ( ) @@ -287,7 +285,7 @@ export function BottomBar({navigation}: BottomTabBarProps) { ]}> { closeAllActiveElements() @@ -74,11 +82,10 @@ export function BottomBarWeb() { <> {({isActive}) => { - const Icon = isActive ? HomeIconSolid : HomeIcon + const Icon = isActive ? HomeFilled : Home return ( ) @@ -86,14 +93,11 @@ export function BottomBarWeb() { {({isActive}) => { - const Icon = isActive - ? MagnifyingGlassIcon2Solid - : MagnifyingGlassIcon2 + const Icon = isActive ? MagnifyingGlassFilled : MagnifyingGlass return ( ) }} @@ -103,22 +107,21 @@ export function BottomBarWeb() { <> {({isActive}) => { + const Icon = isActive ? HashtagFilled : Hashtag return ( - ) }} {({isActive}) => { - const Icon = isActive ? BellIconSolid : BellIcon + const Icon = isActive ? BellFilled : Bell return ( ) @@ -130,7 +133,7 @@ export function BottomBarWeb() { const Icon = isActive ? MessageFilled : Message return ( ) @@ -148,11 +151,10 @@ export function BottomBarWeb() { : '/' }> {({isActive}) => { - const Icon = isActive ? UserIconSolid : UserIcon + const Icon = isActive ? UserCircleFilled : UserCircle return ( )