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