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