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

Function SidebarTrigger

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useSidebarFunction · 0.85

Tested by

no test coverage detected