MCPcopy
hub / github.com/TheOrcDev/8bitcn-ui / SidebarTrigger

Function SidebarTrigger

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

Source from the content-addressed store, hash-verified

259}
260
261function SidebarTrigger({
262 className,
263 onClick,
264 ...props
265}: React.ComponentProps<typeof Button>) {
266 const { toggleSidebar } = useSidebar();
267
268 return (
269 <Button
270 className={cn("size-7", className)}
271 data-sidebar="trigger"
272 data-slot="sidebar-trigger"
273 onClick={(event) => {
274 onClick?.(event);
275 toggleSidebar();
276 }}
277 size="icon"
278 variant="ghost"
279 {...props}
280 >
281 <PanelLeftIcon />
282 <span className="sr-only">Toggle Sidebar</span>
283 </Button>
284 );
285}
286
287function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
288 const { toggleSidebar } = useSidebar();

Callers

nothing calls this directly

Calls 3

cnFunction · 0.90
useSidebarFunction · 0.85
onClickFunction · 0.85

Tested by

no test coverage detected