From c51805fe69bc792bf3ed4a0792f4059fca0f01e2 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 21 Mar 2023 16:53:49 -0700 Subject: [PATCH] Pull out resize bar --- src-web/components/ResponsePane.tsx | 2 +- src-web/components/Sidebar.tsx | 42 +++++++++++++++++++---------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src-web/components/ResponsePane.tsx b/src-web/components/ResponsePane.tsx index b6e95cd4..8716e7e9 100644 --- a/src-web/components/ResponsePane.tsx +++ b/src-web/components/ResponsePane.tsx @@ -47,7 +47,7 @@ export const ResponsePane = memo(function ResponsePane({ className }: Props) {
diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index e60c0d7b..b1f80182 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -80,25 +80,13 @@ export const Sidebar = memo(function Sidebar({ className }: Props) { return (
-
-
-
+
@@ -389,3 +377,29 @@ const DraggableSidebarItem = memo(function DraggableSidebarItem({ /> ); }); + +interface ResizeBarProps { + isResizing: boolean; + onResizeStart: (e: ReactMouseEvent) => void; + onReset: () => void; +} + +function ResizeBar({ onResizeStart, onReset, isResizing }: ResizeBarProps) { + return ( +
+ {/* Show global overlay with cursor style to ensure cursor remains the same when moving quickly */} + {isResizing &&
} +
+
+ ); +}