MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / DropdownMenuItem

Function DropdownMenuItem

components/ui/dropdown-menu.tsx:80–101  ·  view source on GitHub ↗
({
  className,
  inset,
  variant = "default",
  ...props
}: MenuPrimitive.Item.Props & {
  inset?: boolean;
  variant?: "default" | "destructive";
})

Source from the content-addressed store, hash-verified

78}
79
80function DropdownMenuItem({
81 className,
82 inset,
83 variant = "default",
84 ...props
85}: MenuPrimitive.Item.Props & {
86 inset?: boolean;
87 variant?: "default" | "destructive";
88}) {
89 return (
90 <MenuPrimitive.Item
91 data-slot="dropdown-menu-item"
92 data-inset={inset}
93 data-variant={variant}
94 className={cn(
95 "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 not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-2 py-2 text-xs [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
96 className
97 )}
98 {...props}
99 />
100 );
101}
102
103function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
104 return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />;

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected