fix: enhance layout of editor and resizable components for better usability
This commit is contained in:
@ -55,9 +55,9 @@ export default function Editor() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<EditorProvider>
|
<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 />
|
<EditorHeader />
|
||||||
<div className="flex-1 overflow-hidden">
|
<div className="flex-1 min-h-0 min-w-0">
|
||||||
<ResizablePanelGroup
|
<ResizablePanelGroup
|
||||||
direction="vertical"
|
direction="vertical"
|
||||||
className="h-full w-full gap-1"
|
className="h-full w-full gap-1"
|
||||||
@ -67,6 +67,7 @@ export default function Editor() {
|
|||||||
minSize={30}
|
minSize={30}
|
||||||
maxSize={85}
|
maxSize={85}
|
||||||
onResize={setMainContent}
|
onResize={setMainContent}
|
||||||
|
className="min-h-0"
|
||||||
>
|
>
|
||||||
{/* Main content area */}
|
{/* Main content area */}
|
||||||
<ResizablePanelGroup
|
<ResizablePanelGroup
|
||||||
@ -118,7 +119,7 @@ export default function Editor() {
|
|||||||
minSize={15}
|
minSize={15}
|
||||||
maxSize={70}
|
maxSize={70}
|
||||||
onResize={setTimeline}
|
onResize={setTimeline}
|
||||||
className="px-2 pb-2"
|
className="min-h-0 px-2 pb-2"
|
||||||
>
|
>
|
||||||
<Timeline />
|
<Timeline />
|
||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
|
@ -33,13 +33,7 @@ const ResizableHandle = ({
|
|||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...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 };
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
||||||
|
Reference in New Issue
Block a user