1
1
import * as TabsPrimitive from '@radix-ui/react-tabs' ;
2
- import * as React from 'react' ;
2
+ import type { ComponentPropsWithoutRef , ElementRef } from 'react' ;
3
3
4
4
import { cn } from '~/shared/lib/utils' ;
5
5
6
6
const Tabs = TabsPrimitive . Root ;
7
7
8
- const TabsList = React . forwardRef <
9
- React . ElementRef < typeof TabsPrimitive . List > ,
10
- React . ComponentPropsWithoutRef < typeof TabsPrimitive . List >
8
+ const TabsList = forwardRef <
9
+ ElementRef < typeof TabsPrimitive . List > ,
10
+ ComponentPropsWithoutRef < typeof TabsPrimitive . List >
11
11
> ( ( { className, ...props } , ref ) => (
12
12
< TabsPrimitive . List
13
13
ref = { ref }
@@ -20,9 +20,9 @@ const TabsList = React.forwardRef<
20
20
) ) ;
21
21
TabsList . displayName = TabsPrimitive . List . displayName ;
22
22
23
- const TabsTrigger = React . forwardRef <
24
- React . ElementRef < typeof TabsPrimitive . Trigger > ,
25
- React . ComponentPropsWithoutRef < typeof TabsPrimitive . Trigger >
23
+ const TabsTrigger = forwardRef <
24
+ ElementRef < typeof TabsPrimitive . Trigger > ,
25
+ ComponentPropsWithoutRef < typeof TabsPrimitive . Trigger >
26
26
> ( ( { className, ...props } , ref ) => (
27
27
< TabsPrimitive . Trigger
28
28
ref = { ref }
@@ -35,9 +35,9 @@ const TabsTrigger = React.forwardRef<
35
35
) ) ;
36
36
TabsTrigger . displayName = TabsPrimitive . Trigger . displayName ;
37
37
38
- const TabsContent = React . forwardRef <
39
- React . ElementRef < typeof TabsPrimitive . Content > ,
40
- React . ComponentPropsWithoutRef < typeof TabsPrimitive . Content >
38
+ const TabsContent = forwardRef <
39
+ ElementRef < typeof TabsPrimitive . Content > ,
40
+ ComponentPropsWithoutRef < typeof TabsPrimitive . Content >
41
41
> ( ( { className, ...props } , ref ) => (
42
42
< TabsPrimitive . Content
43
43
ref = { ref }
0 commit comments