2025-03-08 13:16:57 +00:00
|
|
|
import { PlaygroundHeader } from "@/features/playground/header";
|
2025-03-08 10:00:13 +00:00
|
|
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
|
|
|
|
2025-03-08 13:11:18 +00:00
|
|
|
interface PlaygroundLayoutProps {
|
2025-03-08 10:00:13 +00:00
|
|
|
problem: React.ReactNode;
|
2025-03-08 13:11:18 +00:00
|
|
|
workspace: React.ReactNode;
|
2025-03-08 10:00:13 +00:00
|
|
|
terminal: React.ReactNode;
|
|
|
|
}
|
|
|
|
|
2025-03-08 13:11:18 +00:00
|
|
|
export default function PlaygroundLayout({
|
2025-03-08 10:00:13 +00:00
|
|
|
problem,
|
2025-03-08 13:11:18 +00:00
|
|
|
workspace,
|
2025-03-08 10:00:13 +00:00
|
|
|
terminal,
|
2025-03-08 13:11:18 +00:00
|
|
|
}: PlaygroundLayoutProps) {
|
2025-03-08 10:00:13 +00:00
|
|
|
return (
|
|
|
|
<div className="h-screen flex flex-col">
|
2025-03-08 13:16:57 +00:00
|
|
|
<PlaygroundHeader />
|
2025-03-08 10:00:13 +00:00
|
|
|
<main className="flex flex-grow overflow-y-hidden p-2.5 pt-0">
|
|
|
|
<ResizablePanelGroup direction="horizontal" className="relative h-full flex">
|
|
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-3xl">
|
|
|
|
{problem}
|
|
|
|
</ResizablePanel>
|
|
|
|
<ResizableHandle className="mx-1 bg-transparent hover:bg-blue-500" />
|
|
|
|
<ResizablePanel defaultSize={50}>
|
|
|
|
<ResizablePanelGroup direction="vertical">
|
2025-03-09 05:26:05 +00:00
|
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-3xl">
|
2025-03-08 13:11:18 +00:00
|
|
|
{workspace}
|
2025-03-08 10:00:13 +00:00
|
|
|
</ResizablePanel>
|
|
|
|
<ResizableHandle className="my-1 bg-transparent hover:bg-blue-500" />
|
2025-03-09 05:26:05 +00:00
|
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-3xl">
|
2025-03-08 10:00:13 +00:00
|
|
|
{terminal}
|
|
|
|
</ResizablePanel>
|
|
|
|
</ResizablePanelGroup>
|
|
|
|
</ResizablePanel>
|
|
|
|
</ResizablePanelGroup>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|