MCPcopy Create free account
hub / github.com/arctic-cli/interface / SidebarMenuBadge

Function SidebarMenuBadge

packages/web/components/ui/sidebar.tsx:545–562  ·  view source on GitHub ↗
({ className, ...props }: React.ComponentProps<"div">)

Source from the content-addressed store, hash-verified

543}
544
545function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">) {
546 return (
547 <div
548 className={cn(
549 "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-lg px-1 font-medium text-sidebar-foreground text-xs tabular-nums",
550 "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
551 "peer-data-[size=sm]/menu-button:top-1",
552 "peer-data-[size=default]/menu-button:top-1.5",
553 "peer-data-[size=lg]/menu-button:top-2.5",
554 "group-data-[collapsible=icon]:hidden",
555 className,
556 )}
557 data-sidebar="menu-badge"
558 data-slot="sidebar-menu-badge"
559 {...props}
560 />
561 )
562}
563
564const getRandomWidth = () => `${Math.floor(Math.random() * 40) + 50}%`
565

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected