Skip to content

Commit

Permalink
feat(ui): Replace sidebar toggle button (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt authored Jan 24, 2025
1 parent a7a7b65 commit 7ca9d28
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions frontend/src/components/workbench/workbench.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from "react"
import { useWorkflowBuilder } from "@/providers/builder"
import { ChevronLeftIcon } from "lucide-react"
import { SidebarIcon } from "lucide-react"

import { cn } from "@/lib/utils"
import { Button } from "@/components/ui/button"
Expand Down Expand Up @@ -61,17 +61,13 @@ export function Workbench({ defaultLayout = [0, 68, 32] }: WorkbenchProps) {
<Button
variant="ghost"
className={cn(
"rounded-full bg-transparent hover:bg-transparent active:cursor-grabbing",
isSidebarCollapsed && "bg-border hover:bg-border"
"absolute top-0 m-0 translate-x-6 rounded-full !bg-transparent p-4 active:cursor-grabbing"
)}
onClick={toggleSidebar}
>
<ChevronLeftIcon
className={cn(
"mx-0 size-3",
isSidebarCollapsed && "translate-x-2 rotate-180"
)}
/>
<div className="group rounded-sm p-1 hover:bg-border">
<SidebarIcon className="group size-4 text-muted-foreground group-hover:text-foreground" />
</div>
</Button>
</TooltipTrigger>
{isSidebarCollapsed && (
Expand Down

0 comments on commit 7ca9d28

Please sign in to comment.