Skip to content

Commit d13d578

Browse files
Merge pull request #313 from softnetics/supakorn/fix/components
fix: `tabs` component styling unknown reason reverted back to old one.
2 parents 86b64e6 + b45ea3f commit d13d578

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.changeset/angry-flowers-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@genseki/ui": patch
3+
---
4+
5+
fix: `tabs` component styling unknown reason reverted back to old one.

packages/ui/src/components/primitives/tabs.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import { cn } from '../../utils/cn'
1111
type Variants = 'default' | 'underline'
1212

1313
const tabListVariants = cva<{ variant: Record<Variants, any> }>(
14-
'h-18 w-fit items-center justify-center',
14+
'w-full items-center justify-center',
1515
{
1616
variants: {
1717
variant: {
1818
default: 'bg-muted text-muted-foreground inline-flex rounded-lg p-[3px]',
19-
underline: '',
19+
underline: 'border-b',
2020
},
2121
},
2222
defaultVariants: {
@@ -32,8 +32,10 @@ const tabVariants = cva<{ variant: Record<Variants, any> }>(
3232
variant: {
3333
default:
3434
'h-[calc(100%-1px)] gap-3 data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:ring-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground rounded-md border border-transparent px-4 py-2 focus-visible:ring-[2px] data-[state=active]:shadow-sm ',
35-
underline:
36-
'data-[state=active]:text-primary data-[state=active]:border-primary px-3 pb-5 border-b-[2px] focus-visible:ring-[2px] focus-visible:ring-ring focus-visible:ring-offset-2',
35+
underline: [
36+
'relative data-[state=active]:text-primary px-3 pb-5 focus-visible:ring-[2px] focus-visible:ring-ring focus-visible:ring-offset-2',
37+
'before:absolute before:block before:content-[""] data-[state=active]:before:w-full before:h-1 before:bg-primary before:-bottom-px',
38+
],
3739
},
3840
},
3941
defaultVariants: {

0 commit comments

Comments
 (0)