fix: enhance layout of editor and resizable components for better usability

This commit is contained in:
Anwarul Islam
2025-07-12 23:49:49 +06:00
parent 9d828063c1
commit 0ee043b319
2 changed files with 5 additions and 10 deletions

View File

@ -55,9 +55,9 @@ export default function Editor() {
return (
<EditorProvider>
<div className="h-screen w-screen flex flex-col bg-background">
<div className="h-screen w-screen flex flex-col bg-background overflow-hidden">
<EditorHeader />
<div className="flex-1 overflow-hidden">
<div className="flex-1 min-h-0 min-w-0">
<ResizablePanelGroup
direction="vertical"
className="h-full w-full gap-1"
@ -67,6 +67,7 @@ export default function Editor() {
minSize={30}
maxSize={85}
onResize={setMainContent}
className="min-h-0"
>
{/* Main content area */}
<ResizablePanelGroup
@ -118,7 +119,7 @@ export default function Editor() {
minSize={15}
maxSize={70}
onResize={setTimeline}
className="px-2 pb-2"
className="min-h-0 px-2 pb-2"
>
<Timeline />
</ResizablePanel>

View File

@ -33,13 +33,7 @@ const ResizableHandle = ({
className
)}
{...props}
>
{withHandle && (
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-background opacity-0 hover:opacity-100 transition-opacity">
<GripVertical className="h-2.5 w-2.5" />
</div>
)}
</ResizablePrimitive.PanelResizeHandle>
/>
);
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };