({
className,
onClick,
...props
}: React.ComponentProps<typeof Button>)
| 254 | } |
| 255 | |
| 256 | function SidebarTrigger({ |
| 257 | className, |
| 258 | onClick, |
| 259 | ...props |
| 260 | }: React.ComponentProps<typeof Button>) { |
| 261 | const { toggleSidebar } = useSidebar() |
| 262 | |
| 263 | return ( |
| 264 | <Button |
| 265 | data-sidebar="trigger" |
| 266 | data-slot="sidebar-trigger" |
| 267 | variant="ghost" |
| 268 | size="icon" |
| 269 | className={cn("size-7", className)} |
| 270 | onClick={(event) => { |
| 271 | onClick?.(event) |
| 272 | toggleSidebar() |
| 273 | }} |
| 274 | {...props} |
| 275 | > |
| 276 | <PanelLeftIcon /> |
| 277 | <span className="sr-only">Toggle Sidebar</span> |
| 278 | </Button> |
| 279 | ) |
| 280 | } |
| 281 | |
| 282 | function SidebarRail({ className, ...props }: React.ComponentProps<"button">) { |
| 283 | const { toggleSidebar } = useSidebar() |
nothing calls this directly
no test coverage detected