MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / SidebarGroupAction

Function SidebarGroupAction

src/components/ui/sidebar.tsx:417–438  ·  view source on GitHub ↗
({
  className,
  asChild = false,
  ...props
}: React.ComponentProps<"button"> & { asChild?: boolean })

Source from the content-addressed store, hash-verified

415}
416
417function SidebarGroupAction({
418 className,
419 asChild = false,
420 ...props
421}: React.ComponentProps<"button"> & { asChild?: boolean }) {
422 const Comp = asChild ? Slot : "button"
423
424 return (
425 <Comp
426 data-slot="sidebar-group-action"
427 data-sidebar="group-action"
428 className={cn(
429 "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
430 // Increases the hit area of the button on mobile.
431 "after:absolute after:-inset-2 md:after:hidden",
432 "group-data-[collapsible=icon]:hidden",
433 className
434 )}
435 {...props}
436 />
437 )
438}
439
440function SidebarGroupContent({
441 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected