@@ -15,12 +15,15 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub
1515
1616const DropdownMenuRadioGroup = DropdownMenuPrimitive . RadioGroup
1717
18- const DropdownMenuSubTrigger = React . forwardRef <
19- React . ElementRef < typeof DropdownMenuPrimitive . SubTrigger > ,
20- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . SubTrigger > & {
21- inset ?: boolean
22- }
23- > ( ( { className, inset, children, ...props } , ref ) => (
18+ const DropdownMenuSubTrigger = ( {
19+ ref,
20+ className,
21+ inset,
22+ children,
23+ ...props
24+ } : React . ComponentProps < typeof DropdownMenuPrimitive . SubTrigger > & {
25+ inset ?: boolean
26+ } ) => (
2427 < DropdownMenuPrimitive . SubTrigger
2528 ref = { ref }
2629 className = { cn (
@@ -33,14 +36,15 @@ const DropdownMenuSubTrigger = React.forwardRef<
3336 { children }
3437 < span className = "ml-auto h-4 w-4" > ▶️</ span >
3538 </ DropdownMenuPrimitive . SubTrigger >
36- ) )
39+ )
3740DropdownMenuSubTrigger . displayName =
3841 DropdownMenuPrimitive . SubTrigger . displayName
3942
40- const DropdownMenuSubContent = React . forwardRef <
41- React . ElementRef < typeof DropdownMenuPrimitive . SubContent > ,
42- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . SubContent >
43- > ( ( { className, ...props } , ref ) => (
43+ const DropdownMenuSubContent = ( {
44+ ref,
45+ className,
46+ ...props
47+ } : React . ComponentProps < typeof DropdownMenuPrimitive . SubContent > ) => (
4448 < DropdownMenuPrimitive . SubContent
4549 ref = { ref }
4650 className = { cn (
@@ -49,14 +53,16 @@ const DropdownMenuSubContent = React.forwardRef<
4953 ) }
5054 { ...props }
5155 />
52- ) )
56+ )
5357DropdownMenuSubContent . displayName =
5458 DropdownMenuPrimitive . SubContent . displayName
5559
56- const DropdownMenuContent = React . forwardRef <
57- React . ElementRef < typeof DropdownMenuPrimitive . Content > ,
58- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Content >
59- > ( ( { className, sideOffset = 4 , ...props } , ref ) => (
60+ const DropdownMenuContent = ( {
61+ ref,
62+ className,
63+ sideOffset = 4 ,
64+ ...props
65+ } : React . ComponentProps < typeof DropdownMenuPrimitive . Content > ) => (
6066 < DropdownMenuPrimitive . Portal >
6167 < DropdownMenuPrimitive . Content
6268 ref = { ref }
@@ -68,15 +74,17 @@ const DropdownMenuContent = React.forwardRef<
6874 { ...props }
6975 />
7076 </ DropdownMenuPrimitive . Portal >
71- ) )
77+ )
7278DropdownMenuContent . displayName = DropdownMenuPrimitive . Content . displayName
7379
74- const DropdownMenuItem = React . forwardRef <
75- React . ElementRef < typeof DropdownMenuPrimitive . Item > ,
76- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Item > & {
77- inset ?: boolean
78- }
79- > ( ( { className, inset, ...props } , ref ) => (
80+ const DropdownMenuItem = ( {
81+ ref,
82+ className,
83+ inset,
84+ ...props
85+ } : React . ComponentProps < typeof DropdownMenuPrimitive . Item > & {
86+ inset ?: boolean
87+ } ) => (
8088 < DropdownMenuPrimitive . Item
8189 ref = { ref }
8290 className = { cn (
@@ -86,13 +94,16 @@ const DropdownMenuItem = React.forwardRef<
8694 ) }
8795 { ...props }
8896 />
89- ) )
97+ )
9098DropdownMenuItem . displayName = DropdownMenuPrimitive . Item . displayName
9199
92- const DropdownMenuCheckboxItem = React . forwardRef <
93- React . ElementRef < typeof DropdownMenuPrimitive . CheckboxItem > ,
94- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . CheckboxItem >
95- > ( ( { className, children, checked, ...props } , ref ) => (
100+ const DropdownMenuCheckboxItem = ( {
101+ ref,
102+ className,
103+ children,
104+ checked,
105+ ...props
106+ } : React . ComponentProps < typeof DropdownMenuPrimitive . CheckboxItem > ) => (
96107 < DropdownMenuPrimitive . CheckboxItem
97108 ref = { ref }
98109 className = { cn (
@@ -118,14 +129,18 @@ const DropdownMenuCheckboxItem = React.forwardRef<
118129 </ span >
119130 { children }
120131 </ DropdownMenuPrimitive . CheckboxItem >
121- ) )
132+ )
122133DropdownMenuCheckboxItem . displayName =
123134 DropdownMenuPrimitive . CheckboxItem . displayName
124135
125- const DropdownMenuRadioItem = React . forwardRef <
126- React . ElementRef < typeof DropdownMenuPrimitive . RadioItem > ,
127- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . RadioItem >
128- > ( ( { className, children, ...props } , ref ) => (
136+ const DropdownMenuRadioItem = ( {
137+ ref,
138+ className,
139+ children,
140+ ...props
141+ } : React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . RadioItem > & {
142+ ref : React . RefObject < React . ElementRef < typeof DropdownMenuPrimitive . RadioItem > >
143+ } ) => (
129144 < DropdownMenuPrimitive . RadioItem
130145 ref = { ref }
131146 className = { cn (
@@ -141,15 +156,17 @@ const DropdownMenuRadioItem = React.forwardRef<
141156 </ span >
142157 { children }
143158 </ DropdownMenuPrimitive . RadioItem >
144- ) )
159+ )
145160DropdownMenuRadioItem . displayName = DropdownMenuPrimitive . RadioItem . displayName
146161
147- const DropdownMenuLabel = React . forwardRef <
148- React . ElementRef < typeof DropdownMenuPrimitive . Label > ,
149- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Label > & {
150- inset ?: boolean
151- }
152- > ( ( { className, inset, ...props } , ref ) => (
162+ const DropdownMenuLabel = ( {
163+ ref,
164+ className,
165+ inset,
166+ ...props
167+ } : React . ComponentProps < typeof DropdownMenuPrimitive . Label > & {
168+ inset ?: boolean
169+ } ) => (
153170 < DropdownMenuPrimitive . Label
154171 ref = { ref }
155172 className = { cn (
@@ -159,19 +176,20 @@ const DropdownMenuLabel = React.forwardRef<
159176 ) }
160177 { ...props }
161178 />
162- ) )
179+ )
163180DropdownMenuLabel . displayName = DropdownMenuPrimitive . Label . displayName
164181
165- const DropdownMenuSeparator = React . forwardRef <
166- React . ElementRef < typeof DropdownMenuPrimitive . Separator > ,
167- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Separator >
168- > ( ( { className, ...props } , ref ) => (
182+ const DropdownMenuSeparator = ( {
183+ ref,
184+ className,
185+ ...props
186+ } : React . ComponentProps < typeof DropdownMenuPrimitive . Separator > ) => (
169187 < DropdownMenuPrimitive . Separator
170188 ref = { ref }
171189 className = { cn ( '-mx-1 my-1 h-px bg-muted' , className ) }
172190 { ...props }
173191 />
174- ) )
192+ )
175193DropdownMenuSeparator . displayName = DropdownMenuPrimitive . Separator . displayName
176194
177195const DropdownMenuShortcut = ( {
0 commit comments