Function
ContextMenuSubTrigger
({
className,
inset,
children,
...props
}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
inset?: boolean
})
Source from the content-addressed store, hash-verified
| 54 | } |
| 55 | |
| 56 | function ContextMenuSubTrigger({ |
| 57 | className, |
| 58 | inset, |
| 59 | children, |
| 60 | ...props |
| 61 | }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & { |
| 62 | inset?: boolean |
| 63 | }) { |
| 64 | return ( |
| 65 | <ContextMenuPrimitive.SubTrigger |
| 66 | data-slot="context-menu-sub-trigger" |
| 67 | data-inset={inset} |
| 68 | className={cn( |
| 69 | "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", |
| 70 | className |
| 71 | )} |
| 72 | {...props} |
| 73 | > |
| 74 | {children} |
| 75 | <ChevronRightIcon className="ml-auto" /> |
| 76 | </ContextMenuPrimitive.SubTrigger> |
| 77 | ) |
| 78 | } |
| 79 | |
| 80 | function ContextMenuSubContent({ |
| 81 | className, |
Callers
nothing calls this directly
Tested by
no test coverage detected