({
className,
onClick,
...props
}: React.ComponentProps<typeof Button>)
| 259 | } |
| 260 | |
| 261 | function 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 | |
| 287 | function SidebarRail({ className, ...props }: React.ComponentProps<"button">) { |
| 288 | const { toggleSidebar } = useSidebar(); |
nothing calls this directly
no test coverage detected