| 393 | } |
| 394 | |
| 395 | function SidebarGroupAction({ |
| 396 | className, |
| 397 | asChild = false, |
| 398 | ...props |
| 399 | }: React.ComponentProps<"button"> & { asChild?: boolean }) { |
| 400 | const Comp = asChild ? Slot.Root : "button"; |
| 401 | |
| 402 | return ( |
| 403 | <Comp |
| 404 | data-slot="sidebar-group-action" |
| 405 | data-sidebar="group-action" |
| 406 | className={cn( |
| 407 | "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", |
| 408 | // Increases the hit area of the button on mobile. |
| 409 | "after:absolute after:-inset-2 md:after:hidden", |
| 410 | "group-data-[collapsible=icon]:hidden", |
| 411 | className, |
| 412 | )} |
| 413 | {...props} |
| 414 | /> |
| 415 | ); |
| 416 | } |
| 417 | |
| 418 | function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">) { |
| 419 | return ( |