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

Function DropdownMenuCheckboxItem

components/ui/dropdown-menu.tsx:97–124  ·  view source on GitHub ↗
({
  className,
  children,
  checked,
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>)

Source from the content-addressed store, hash-verified

95}
96
97function DropdownMenuCheckboxItem({
98 className,
99 children,
100 checked,
101 ...props
102}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
103 return (
104 <DropdownMenuPrimitive.CheckboxItem
105 data-slot="dropdown-menu-checkbox-item"
106 className={cn(
107 "relative flex cursor-pointer select-none items-center gap-2 rounded-sm py-2 pl-8 pr-3 text-sm outline-none transition-colors",
108 "text-[var(--color-text)] hover:bg-[var(--color-bg-weak)]",
109 "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
110 "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
111 className
112 )}
113 checked={checked}
114 {...props}
115 >
116 <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
117 <DropdownMenuPrimitive.ItemIndicator>
118 <CheckIcon className="size-4" />
119 </DropdownMenuPrimitive.ItemIndicator>
120 </span>
121 {children}
122 </DropdownMenuPrimitive.CheckboxItem>
123 )
124}
125
126function DropdownMenuRadioGroup({
127 ...props

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected