From 0097ecc796ae841645031ed9da0a06389ef71654 Mon Sep 17 00:00:00 2001 From: Stavros Date: Thu, 25 Jun 2026 17:30:54 +0300 Subject: [PATCH] feat: animate account avatar to close icon --- .../quick-actions/quick-actions.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/quick-actions/quick-actions.tsx b/frontend/src/components/quick-actions/quick-actions.tsx index ae3d4828..c1628fa5 100644 --- a/frontend/src/components/quick-actions/quick-actions.tsx +++ b/frontend/src/components/quick-actions/quick-actions.tsx @@ -25,6 +25,7 @@ import { Palette, Settings, Sun, + X, } from "lucide-react"; import { useTranslation } from "react-i18next"; import { useLocation } from "react-router"; @@ -45,13 +46,17 @@ import { PocketIDIcon } from "../icons/pocket-id"; import { LocalAuthIcon } from "../icons/local-auth"; import { OAuthIcon } from "../icons/oauth"; -function Avatar({ initial }: { initial: string }) { +function Avatar({ initial, isOpen }: { initial: string; isOpen: boolean }) { return ( - - {initial} - + {isOpen ? ( + + ) : ( + + {initial} + + )} ); } @@ -81,6 +86,8 @@ export const QuickActions = () => { const screenParams = useScreenParams(searchParams); const compiledParams = recompileScreenParams(screenParams); + const [isOpen, setIsOpen] = useState(false); + const providerDetails = ((): | { name: string; icon: React.ReactNode } | undefined => { @@ -159,14 +166,14 @@ export const QuickActions = () => { ] as const; return ( - + setIsOpen(open)} open={isOpen}>