| 388 | } |
| 389 | |
| 390 | function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<"button">) { |
| 391 | const defaultProps = { |
| 392 | className: cn( |
| 393 | "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-lg p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0", |
| 394 | // Increases the hit area of the button on mobile. |
| 395 | "after:-inset-2 after:absolute md:after:hidden", |
| 396 | "group-data-[collapsible=icon]:hidden", |
| 397 | className, |
| 398 | ), |
| 399 | "data-sidebar": "group-action", |
| 400 | "data-slot": "sidebar-group-action", |
| 401 | } |
| 402 | |
| 403 | return useRender({ |
| 404 | defaultTagName: "button", |
| 405 | props: mergeProps(defaultProps, props), |
| 406 | render, |
| 407 | }) |
| 408 | } |
| 409 | |
| 410 | function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">) { |
| 411 | return ( |