From 2dd4e866d23179cd2ebf5ef13baa6cd081cfdbe1 Mon Sep 17 00:00:00 2001 From: codytseng Date: Tue, 20 Jan 2026 23:17:06 +0800 Subject: [PATCH] chore: adjust padding for tab indicator and tab items --- src/components/Tabs/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Tabs/index.tsx b/src/components/Tabs/index.tsx index 58359d7..71dba23 100644 --- a/src/components/Tabs/index.tsx +++ b/src/components/Tabs/index.tsx @@ -36,7 +36,7 @@ export default function Tabs({ if (activeIndex >= 0 && tabRefs.current[activeIndex]) { const activeTab = tabRefs.current[activeIndex] const { offsetWidth, offsetLeft } = activeTab - const padding = 24 // 12px padding on each side + const padding = 16 // 8px padding on each side setIndicatorStyle({ width: offsetWidth - padding, left: offsetLeft + padding / 2 @@ -103,7 +103,7 @@ export default function Tabs({ key={tab.value} ref={(el) => (tabRefs.current[index] = el)} className={cn( - `w-fit text-center py-2 px-6 my-1 font-semibold whitespace-nowrap clickable cursor-pointer rounded-xl transition-all duration-200`, + `w-fit text-center py-2 px-4 my-1 font-semibold whitespace-nowrap clickable cursor-pointer rounded-xl transition-all duration-200`, value === tab.value ? 'text-foreground' : 'text-muted-foreground hover:text-foreground'