MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / DropdownMenuItem

Function DropdownMenuItem

apps/ui/src/components/ui/dropdown-menu.tsx:63–84  ·  view source on GitHub ↗
({
  className,
  inset,
  variant = "default",
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
  inset?: boolean;
  variant?: "default" | "destructive";
})

Source from the content-addressed store, hash-verified

61}
62
63function DropdownMenuItem({
64 className,
65 inset,
66 variant = "default",
67 ...props
68}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
69 inset?: boolean;
70 variant?: "default" | "destructive";
71}) {
72 return (
73 <DropdownMenuPrimitive.Item
74 data-slot='dropdown-menu-item'
75 data-inset={inset}
76 data-variant={variant}
77 className={cn(
78 "focus:bg-primary-low focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! relative flex cursor-default items-center gap-2 rounded-md 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",
79 className
80 )}
81 {...props}
82 />
83 );
84}
85
86function DropdownMenuCheckboxItem({
87 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected