MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / SidebarMenuSubButton

Function SidebarMenuSubButton

packages/react/src/components/sidebar.tsx:633–663  ·  view source on GitHub ↗
({
  asChild = false,
  size = "md",
  isActive = false,
  className,
  ...props
}: React.ComponentProps<"a"> & {
  asChild?: boolean;
  size?: "sm" | "md";
  isActive?: boolean;
})

Source from the content-addressed store, hash-verified

631}
632
633function SidebarMenuSubButton({
634 asChild = false,
635 size = "md",
636 isActive = false,
637 className,
638 ...props
639}: React.ComponentProps<"a"> & {
640 asChild?: boolean;
641 size?: "sm" | "md";
642 isActive?: boolean;
643}) {
644 const Comp = asChild ? Slot.Root : "a";
645
646 return (
647 <Comp
648 data-slot="sidebar-menu-sub-button"
649 data-sidebar="menu-sub-button"
650 data-size={size}
651 data-active={isActive}
652 className={cn(
653 "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden 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]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
654 "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
655 size === "sm" && "text-xs",
656 size === "md" && "text-sm",
657 "group-data-[collapsible=icon]:hidden",
658 className,
659 )}
660 {...props}
661 />
662 );
663}
664
665export {
666 Sidebar,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected