MCPcopy Create free account
hub / github.com/R44VC0RP/opencode.cafe / DropdownMenuItem

Function DropdownMenuItem

components/ui/dropdown-menu.tsx:69–95  ·  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

67}
68
69function DropdownMenuItem({
70 className,
71 inset,
72 variant = "default",
73 ...props
74}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
75 inset?: boolean
76 variant?: "default" | "destructive"
77}) {
78 return (
79 <DropdownMenuPrimitive.Item
80 data-slot="dropdown-menu-item"
81 data-inset={inset}
82 data-variant={variant}
83 className={cn(
84 "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-3 py-2 text-sm outline-none transition-colors",
85 "text-[var(--color-text)] hover:bg-[var(--color-bg-weak)]",
86 "data-[variant=destructive]:text-[var(--color-danger)]",
87 "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
88 inset && "pl-8",
89 "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
90 className
91 )}
92 {...props}
93 />
94 )
95}
96
97function DropdownMenuCheckboxItem({
98 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected