| 415 | } |
| 416 | |
| 417 | function SidebarGroupAction({ |
| 418 | className, |
| 419 | asChild = false, |
| 420 | ...props |
| 421 | }: React.ComponentProps<"button"> & { asChild?: boolean }) { |
| 422 | const Comp = asChild ? Slot : "button" |
| 423 | |
| 424 | return ( |
| 425 | <Comp |
| 426 | data-slot="sidebar-group-action" |
| 427 | data-sidebar="group-action" |
| 428 | className={cn( |
| 429 | "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", |
| 430 | // Increases the hit area of the button on mobile. |
| 431 | "after:absolute after:-inset-2 md:after:hidden", |
| 432 | "group-data-[collapsible=icon]:hidden", |
| 433 | className |
| 434 | )} |
| 435 | {...props} |
| 436 | /> |
| 437 | ) |
| 438 | } |
| 439 | |
| 440 | function SidebarGroupContent({ |
| 441 | className, |