Skip to content

Commit bd1711a

Browse files
committed
fix: optimize tabs style realize
1 parent 42cc844 commit bd1711a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/ui/src/components/tabs/source/TabsList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ const TabsList = forwardRef<React.ElementRef<typeof List>, TabsListProps>((props
2020

2121
const mergedRef = useComposedRefs(ref, tabsListRef);
2222

23-
const { list } = tabsVariants({ orientation, size });
23+
const { indicator, indicatorRoot, list } = tabsVariants({ orientation, size });
2424

2525
const mergedCls = cn(list(), className);
2626

27-
const { indicator, indicatorRoot } = tabsVariants({ size });
28-
2927
const mergedRootCls = cn(indicatorRoot(), classNames?.indicatorRoot);
3028

3129
const mergedIndicatorCls = cn(indicator(), classNames?.indicator);

packages/ui/src/components/tabs/source/TabsRoot.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import type { TabsRootProps } from '../types';
77
const TabRoot = forwardRef<React.ElementRef<typeof Root>, TabsRootProps>((props, ref) => {
88
const { className, fill, orientation, size, ...rest } = props;
99

10-
const mergedCls = cn(tabsVariants({ fill, orientation, size }), className);
10+
const { root } = tabsVariants({ fill, orientation, size });
11+
12+
const mergedCls = cn(root(), className);
1113

1214
return (
1315
<Root

0 commit comments

Comments
 (0)