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

Function SidebarTrigger

packages/react/src/components/sidebar.tsx:243–263  ·  view source on GitHub ↗
({ className, onClick, ...props }: React.ComponentProps<typeof Button>)

Source from the content-addressed store, hash-verified

241}
242
243function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {
244 const { toggleSidebar } = useSidebar();
245
246 return (
247 <Button
248 data-sidebar="trigger"
249 data-slot="sidebar-trigger"
250 variant="ghost"
251 size="icon"
252 className={cn("size-7", className)}
253 onClick={(event) => {
254 onClick?.(event);
255 toggleSidebar();
256 }}
257 {...props}
258 >
259 <PanelLeftIcon />
260 <span className="sr-only">Toggle Sidebar</span>
261 </Button>
262 );
263}
264
265function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
266 const { toggleSidebar } = useSidebar();

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useSidebarFunction · 0.85

Tested by

no test coverage detected