| 620 | } |
| 621 | |
| 622 | function SidebarMenuSubButton({ |
| 623 | size = "md", |
| 624 | isActive = false, |
| 625 | className, |
| 626 | render, |
| 627 | ...props |
| 628 | }: useRender.ComponentProps<"a"> & { |
| 629 | size?: "sm" | "md" |
| 630 | isActive?: boolean |
| 631 | }) { |
| 632 | const defaultProps = { |
| 633 | className: cn( |
| 634 | "-translate-x-px flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-lg px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", |
| 635 | "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", |
| 636 | size === "sm" && "text-xs", |
| 637 | size === "md" && "text-sm", |
| 638 | "group-data-[collapsible=icon]:hidden", |
| 639 | className, |
| 640 | ), |
| 641 | "data-active": isActive, |
| 642 | "data-sidebar": "menu-sub-button", |
| 643 | "data-size": size, |
| 644 | "data-slot": "sidebar-menu-sub-button", |
| 645 | } |
| 646 | |
| 647 | return useRender({ |
| 648 | defaultTagName: "a", |
| 649 | props: mergeProps<"a">(defaultProps, props), |
| 650 | render, |
| 651 | }) |
| 652 | } |
| 653 | |
| 654 | export { |
| 655 | Sidebar, |