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

Function SidebarGroupAction

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

Source from the content-addressed store, hash-verified

393}
394
395function SidebarGroupAction({
396 className,
397 asChild = false,
398 ...props
399}: React.ComponentProps<"button"> & { asChild?: boolean }) {
400 const Comp = asChild ? Slot.Root : "button";
401
402 return (
403 <Comp
404 data-slot="sidebar-group-action"
405 data-sidebar="group-action"
406 className={cn(
407 "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
408 // Increases the hit area of the button on mobile.
409 "after:absolute after:-inset-2 md:after:hidden",
410 "group-data-[collapsible=icon]:hidden",
411 className,
412 )}
413 {...props}
414 />
415 );
416}
417
418function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">) {
419 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected