From fbc45819d439bd94095ade08a29f21a4f6c5442f Mon Sep 17 00:00:00 2001 From: kovsu <2583695112@qq.com> Date: Tue, 31 Dec 2024 11:39:08 +0800 Subject: [PATCH] fix: flickering issue when FAB button disappears --- apps/renderer/src/components/ui/fab/FABContainer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/components/ui/fab/FABContainer.tsx b/apps/renderer/src/components/ui/fab/FABContainer.tsx index eaf520a2a8..d234825882 100644 --- a/apps/renderer/src/components/ui/fab/FABContainer.tsx +++ b/apps/renderer/src/components/ui/fab/FABContainer.tsx @@ -43,6 +43,10 @@ export const FABBase = typescriptHappyForwardRef( initial={{ scale: 0, opacity: 0 }} animate={{ scale: 1, opacity: 1 }} exit={{ scale: 0, opacity: 0 }} + transition={{ + duration: 0.2, + ease: "easeInOut", + }} ref={ref} aria-label="Floating action button" className={cn( @@ -51,8 +55,6 @@ export const FABBase = typescriptHappyForwardRef( "outline-accent hover:opacity-100 focus:opacity-100 focus:outline-none", "rounded-xl border border-zinc-400/20 backdrop-blur-lg dark:border-zinc-500/30 dark:text-zinc-200", "bg-zinc-50/80 shadow-lg dark:bg-neutral-900/80", - "transition-all duration-500 ease-in-out", - className, )} {...rest}