diff --git a/apps/web/src/components/preview/RightPanelResizeHandle.tsx b/apps/web/src/components/PanelResizeHandle.tsx similarity index 67% rename from apps/web/src/components/preview/RightPanelResizeHandle.tsx rename to apps/web/src/components/PanelResizeHandle.tsx index 5091c8b5915ad..875ab6f8a5b92 100644 --- a/apps/web/src/components/preview/RightPanelResizeHandle.tsx +++ b/apps/web/src/components/PanelResizeHandle.tsx @@ -3,24 +3,27 @@ import { cn } from "~/lib/utils"; interface Props { handlers: ResizableWidthHandlers; + /** The panel edge the handle sits on: "left" for right-anchored panels, "right" for left-anchored ones. */ + edge?: "left" | "right"; className?: string; } /** - * Hit target for resizing a right-anchored panel via its left edge. + * Hit target for resizing a side panel from one of its edges. * * - Sits on top of the panel's border with a 4px overlap on each side so the * user can grab a few pixels off the edge without aiming. * - Visual indicator is a 1px line that lights up on hover/active to mirror * VS Code / Cursor. */ -export function RightPanelResizeHandle({ handlers, className }: Props) { +export function PanelResizeHandle({ handlers, edge = "left", className }: Props) { return (