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

Function SidebarTrigger

packages/web/components/ui/sidebar.tsx:241–261  ·  view source on GitHub ↗
({ className, onClick, ...props }: React.ComponentProps<typeof Button>)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useSidebarFunction · 0.85

Tested by

no test coverage detected