| 218 | } |
| 219 | |
| 220 | function 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 | |
| 248 | function DropdownMenuSubContent({ |
| 249 | className, |