2025-02-21 13:06:26 +00:00
|
|
|
import {
|
|
|
|
ResizableHandle,
|
|
|
|
ResizablePanel,
|
|
|
|
ResizablePanelGroup,
|
|
|
|
} from "@/components/ui/resizable";
|
2025-03-08 11:50:21 +00:00
|
|
|
import { WorkspaceHeader } from "@/components/workspace-header";
|
2025-02-21 13:06:26 +00:00
|
|
|
|
|
|
|
interface PlaygroundLayoutProps {
|
2025-02-24 11:16:31 +00:00
|
|
|
problem: React.ReactNode;
|
2025-02-23 11:17:03 +00:00
|
|
|
workspace: React.ReactNode;
|
2025-02-21 13:06:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default function PlaygroundLayout({
|
2025-02-24 11:16:31 +00:00
|
|
|
problem,
|
2025-02-23 11:17:03 +00:00
|
|
|
workspace,
|
2025-02-21 13:06:26 +00:00
|
|
|
}: PlaygroundLayoutProps) {
|
|
|
|
return (
|
2025-03-07 03:45:18 +00:00
|
|
|
<div className="h-full flex flex-col">
|
2025-03-08 11:50:21 +00:00
|
|
|
<WorkspaceHeader />
|
2025-03-07 03:45:18 +00:00
|
|
|
<ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0">
|
|
|
|
<ResizablePanel
|
|
|
|
defaultSize={50}
|
|
|
|
className="border border-muted rounded-2xl"
|
|
|
|
>
|
|
|
|
{problem}
|
|
|
|
</ResizablePanel>
|
|
|
|
<ResizableHandle
|
|
|
|
withHandle
|
|
|
|
className="w-0.5 bg-transparent hover:bg-blue-500 mx-1"
|
|
|
|
/>
|
|
|
|
<ResizablePanel
|
|
|
|
defaultSize={50}
|
|
|
|
className="border border-muted rounded-2xl"
|
|
|
|
>
|
|
|
|
{workspace}
|
|
|
|
</ResizablePanel>
|
|
|
|
</ResizablePanelGroup>
|
|
|
|
</div>
|
2025-02-21 13:06:26 +00:00
|
|
|
);
|
|
|
|
}
|