Function
MenubarItem
({
className,
inset,
variant = "default",
...props
}: React.ComponentProps<typeof MenubarPrimitive.Item> & {
inset?: boolean
variant?: "default" | "destructive"
})
Source from the content-addressed store, hash-verified
| 89 | } |
| 90 | |
| 91 | function MenubarItem({ |
| 92 | className, |
| 93 | inset, |
| 94 | variant = "default", |
| 95 | ...props |
| 96 | }: React.ComponentProps<typeof MenubarPrimitive.Item> & { |
| 97 | inset?: boolean |
| 98 | variant?: "default" | "destructive" |
| 99 | }) { |
| 100 | return ( |
| 101 | <MenubarPrimitive.Item |
| 102 | data-slot="menubar-item" |
| 103 | data-inset={inset} |
| 104 | data-variant={variant} |
| 105 | className={cn( |
| 106 | "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", |
| 107 | className |
| 108 | )} |
| 109 | {...props} |
| 110 | /> |
| 111 | ) |
| 112 | } |
| 113 | |
| 114 | function MenubarCheckboxItem({ |
| 115 | className, |
Callers
nothing calls this directly
Tested by
no test coverage detected