From 0be08c23123e51a6f6343ca95052eb609523af65 Mon Sep 17 00:00:00 2001 From: codytseng Date: Wed, 2 Jul 2025 23:02:15 +0800 Subject: [PATCH] fix: adjust padding for tab indicator calculation --- src/components/Tabs/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tabs/index.tsx b/src/components/Tabs/index.tsx index 84b8c6f..d936851 100644 --- a/src/components/Tabs/index.tsx +++ b/src/components/Tabs/index.tsx @@ -30,7 +30,7 @@ export default function Tabs({ if (activeIndex >= 0 && tabRefs.current[activeIndex]) { const activeTab = tabRefs.current[activeIndex] const { offsetWidth, offsetLeft } = activeTab - const padding = 32 // 16px padding on each side + const padding = 24 // 12px padding on each side setIndicatorStyle({ width: offsetWidth - padding, left: offsetLeft + padding / 2