11"use client"
22
33import * as React from "react"
4-
54import * as MenubarPrimitive from "@radix-ui/react-menubar"
65import { Check , ChevronRight , Circle } from "lucide-react"
76
87import { cn } from "../../lib/utils"
98
10- const MenubarMenu = MenubarPrimitive . Menu
9+ const MenubarMenu : typeof MenubarPrimitive . Menu = MenubarPrimitive . Menu
1110
12- const MenubarGroup = MenubarPrimitive . Group
11+ const MenubarGroup : typeof MenubarPrimitive . Group = MenubarPrimitive . Group
1312
1413const MenubarPortal = MenubarPrimitive . Portal
1514
@@ -86,21 +85,26 @@ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName
8685const MenubarContent = React . forwardRef <
8786 React . ElementRef < typeof MenubarPrimitive . Content > ,
8887 React . ComponentPropsWithoutRef < typeof MenubarPrimitive . Content >
89- > ( ( { className, align = "start" , alignOffset = - 4 , sideOffset = 8 , ...props } , ref ) => (
90- < MenubarPrimitive . Portal >
91- < MenubarPrimitive . Content
92- ref = { ref }
93- align = { align }
94- alignOffset = { alignOffset }
95- sideOffset = { sideOffset }
96- className = { cn (
97- "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2" ,
98- className
99- ) }
100- { ...props }
101- />
102- </ MenubarPrimitive . Portal >
103- ) )
88+ > (
89+ (
90+ { className, align = "start" , alignOffset = - 4 , sideOffset = 8 , ...props } ,
91+ ref
92+ ) => (
93+ < MenubarPrimitive . Portal >
94+ < MenubarPrimitive . Content
95+ ref = { ref }
96+ align = { align }
97+ alignOffset = { alignOffset }
98+ sideOffset = { sideOffset }
99+ className = { cn (
100+ "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2" ,
101+ className
102+ ) }
103+ { ...props }
104+ />
105+ </ MenubarPrimitive . Portal >
106+ )
107+ )
104108MenubarContent . displayName = MenubarPrimitive . Content . displayName
105109
106110const MenubarItem = React . forwardRef <
@@ -174,7 +178,11 @@ const MenubarLabel = React.forwardRef<
174178> ( ( { className, inset, ...props } , ref ) => (
175179 < MenubarPrimitive . Label
176180 ref = { ref }
177- className = { cn ( "px-2 py-1.5 text-sm font-semibold" , inset && "pl-8" , className ) }
181+ className = { cn (
182+ "px-2 py-1.5 text-sm font-semibold" ,
183+ inset && "pl-8" ,
184+ className
185+ ) }
178186 { ...props }
179187 />
180188) )
@@ -192,10 +200,16 @@ const MenubarSeparator = React.forwardRef<
192200) )
193201MenubarSeparator . displayName = MenubarPrimitive . Separator . displayName
194202
195- const MenubarShortcut = ( { className, ...props } : React . HTMLAttributes < HTMLSpanElement > ) => {
203+ const MenubarShortcut = ( {
204+ className,
205+ ...props
206+ } : React . HTMLAttributes < HTMLSpanElement > ) => {
196207 return (
197208 < span
198- className = { cn ( "ml-auto text-xs tracking-widest text-muted-foreground" , className ) }
209+ className = { cn (
210+ "ml-auto text-xs tracking-widest text-muted-foreground" ,
211+ className
212+ ) }
199213 { ...props }
200214 />
201215 )
0 commit comments