feat(playground): add min size constraints for resizable panels

This commit is contained in:
cfngc4594 2025-03-12 08:23:24 +08:00
parent 2bc704a818
commit ca2d663533

View File

@ -17,17 +17,17 @@ export default function PlaygroundLayout({
<PlaygroundHeader /> <PlaygroundHeader />
<main className="flex flex-grow overflow-y-hidden p-2.5 pt-0"> <main className="flex flex-grow overflow-y-hidden p-2.5 pt-0">
<ResizablePanelGroup direction="horizontal" className="relative h-full flex"> <ResizablePanelGroup direction="horizontal" className="relative h-full flex">
<ResizablePanel defaultSize={50} className="border border-muted rounded-xl"> <ResizablePanel defaultSize={50} className="border border-muted rounded-xl min-w-9">
{problem} {problem}
</ResizablePanel> </ResizablePanel>
<ResizableHandle className="mx-1 bg-transparent hover:bg-blue-500" /> <ResizableHandle className="mx-1 bg-transparent hover:bg-blue-500" />
<ResizablePanel defaultSize={50}> <ResizablePanel defaultSize={50} className="min-w-9">
<ResizablePanelGroup direction="vertical"> <ResizablePanelGroup direction="vertical">
<ResizablePanel defaultSize={50} className="border border-muted rounded-xl"> <ResizablePanel defaultSize={50} className="border border-muted rounded-xl min-h-9">
{workspace} {workspace}
</ResizablePanel> </ResizablePanel>
<ResizableHandle className="my-1 bg-transparent hover:bg-blue-500" /> <ResizableHandle className="my-1 bg-transparent hover:bg-blue-500" />
<ResizablePanel defaultSize={50} className="border border-muted rounded-xl"> <ResizablePanel defaultSize={50} className="border border-muted rounded-xl min-h-9">
{terminal} {terminal}
</ResizablePanel> </ResizablePanel>
</ResizablePanelGroup> </ResizablePanelGroup>