From 7e44bd274423f830f855ba2f35266f9af76a834e Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 8 May 2025 13:15:38 +0800 Subject: [PATCH] fix(switch): update layout prop to conditionally apply based on isTapped state Signed-off-by: Innei --- packages/internal/components/src/ui/switch/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/internal/components/src/ui/switch/index.tsx b/packages/internal/components/src/ui/switch/index.tsx index dee6e6aca..76d3596c9 100644 --- a/packages/internal/components/src/ui/switch/index.tsx +++ b/packages/internal/components/src/ui/switch/index.tsx @@ -88,7 +88,7 @@ function Switch({ className={cn( "bg-background relative z-[1] flex items-center justify-center rounded-full text-neutral-500 shadow-lg ring-0 dark:text-neutral-400 [&_svg]:size-3", )} - layout + layout={isTapped} transition={{ type: "spring", stiffness: 300, damping: 25 }} style={{ width: 18,