diff --git a/frontend/components/ResizablePane.tsx b/frontend/components/ResizablePane.tsx index 5330539..9668c18 100644 --- a/frontend/components/ResizablePane.tsx +++ b/frontend/components/ResizablePane.tsx @@ -4,16 +4,22 @@ import { useState, useRef, useEffect, ReactNode } from 'react'; type Props = { leftPane: ReactNode; rightPane: ReactNode; + minLeftWidth?: number; + minRightWidth?: number; + defaultLeftWidth?: number; }; -export default function ResizablePanes({ leftPane, rightPane }: Props) { - const [leftWidth, setLeftWidth] = useState(70); // default 70% +export default function ResizablePanes({ + leftPane, + rightPane, + minLeftWidth = 40, + minRightWidth = 15, + defaultLeftWidth = 70, +}: Props) { + const [leftWidth, setLeftWidth] = useState(defaultLeftWidth); // default 70% const [isDragging, setIsDragging] = useState(false); const containerRef = useRef(null); - const minLeftWidth = 40; // left panel min width 40% - const minRightWidth = 15; // right panel min width 15% - const handleMouseDown = () => { setIsDragging(true); }; @@ -45,7 +51,7 @@ export default function ResizablePanes({ leftPane, rightPane }: Props) { document.removeEventListener('mousemove', handleMouseMove); document.removeEventListener('mouseup', handleMouseUp); }; - }, [isDragging]); + }, [isDragging, minLeftWidth, minRightWidth]); return (
diff --git a/frontend/src/app/[locale]/projects/[projectId]/folders/FoldersPane.tsx b/frontend/src/app/[locale]/projects/[projectId]/folders/FoldersPane.tsx index f88cd94..1064ecb 100644 --- a/frontend/src/app/[locale]/projects/[projectId]/folders/FoldersPane.tsx +++ b/frontend/src/app/[locale]/projects/[projectId]/folders/FoldersPane.tsx @@ -132,7 +132,7 @@ export default function FoldersPane({ projectId, messages, locale }: Props) { return ( <> -
+