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

Function DropdownMenuSubTrigger

components/ui/dropdown-menu.tsx:220–246  ·  view source on GitHub ↗
({
  className,
  inset,
  children,
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
  inset?: boolean
})

Source from the content-addressed store, hash-verified

218}
219
220function DropdownMenuSubTrigger({
221 className,
222 inset,
223 children,
224 ...props
225}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
226 inset?: boolean
227}) {
228 return (
229 <DropdownMenuPrimitive.SubTrigger
230 data-slot="dropdown-menu-sub-trigger"
231 data-inset={inset}
232 className={cn(
233 "flex cursor-pointer select-none items-center gap-2 rounded-sm px-3 py-2 text-sm outline-none",
234 "text-[var(--color-text)] hover:bg-[var(--color-bg-weak)]",
235 "data-[state=open]:bg-[var(--color-bg-weak)]",
236 inset && "pl-8",
237 "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
238 className
239 )}
240 {...props}
241 >
242 {children}
243 <ChevronRightIcon className="ml-auto size-4" />
244 </DropdownMenuPrimitive.SubTrigger>
245 )
246}
247
248function DropdownMenuSubContent({
249 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected