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