File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
- import React , { type ComponentPropsWithoutRef } from "react" ;
2
- import { Root , List , Trigger , Content } from "@radix-ui/react-tabs" ;
1
+ import React from "react" ;
2
+ import {
3
+ Root ,
4
+ List ,
5
+ Trigger ,
6
+ Content ,
7
+ type TabsTriggerProps ,
8
+ type TabsListProps ,
9
+ } from "@radix-ui/react-tabs" ;
3
10
4
11
const buttonClassNames =
5
12
"flex-1 block relative px-2.5 py-[5px] text-sm text-foreground-secondary border-none aria-selected:font-bold aria-selected:bg-foreground-quaternary aria-selected:text-background-secondary hover:bg-background-quaternary" ;
@@ -10,15 +17,15 @@ const listClassNames =
10
17
11
18
export const TabsTrigger = React . forwardRef <
12
19
React . ElementRef < typeof Trigger > ,
13
- ComponentPropsWithoutRef < typeof Trigger >
20
+ TabsTriggerProps
14
21
> ( ( { className, ...props } , ref ) => {
15
22
const triggerClasses = [ buttonClassNames , className ] . join ( " " ) ;
16
23
return < Trigger ref = { ref } className = { triggerClasses } { ...props } /> ;
17
24
} ) ;
18
25
19
26
export const TabsList = React . forwardRef <
20
27
React . ElementRef < typeof List > ,
21
- ComponentPropsWithoutRef < typeof List >
28
+ TabsListProps
22
29
> ( ( { className, ...props } , ref ) => {
23
30
const listClasses = [ listClassNames , className ] . join ( " " ) ;
24
31
return < List ref = { ref } className = { listClasses } { ...props } /> ;
You can’t perform that action at this time.
0 commit comments