2025-02-21 13:06:26 +00:00
|
|
|
import {
|
|
|
|
ResizableHandle,
|
|
|
|
ResizablePanel,
|
|
|
|
ResizablePanelGroup,
|
|
|
|
} from "@/components/ui/resizable";
|
|
|
|
|
|
|
|
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-02-23 12:42:57 +00:00
|
|
|
<ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0">
|
2025-02-23 11:17:03 +00:00
|
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
|
2025-02-24 11:16:31 +00:00
|
|
|
{problem}
|
2025-02-21 13:06:26 +00:00
|
|
|
</ResizablePanel>
|
2025-02-23 11:17:03 +00:00
|
|
|
<ResizableHandle
|
|
|
|
withHandle
|
2025-02-24 12:03:37 +00:00
|
|
|
className="w-0.5 bg-transparent hover:bg-blue-500 mx-1"
|
2025-02-23 11:17:03 +00:00
|
|
|
/>
|
|
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
|
|
|
|
{workspace}
|
2025-02-21 13:06:26 +00:00
|
|
|
</ResizablePanel>
|
|
|
|
</ResizablePanelGroup>
|
|
|
|
);
|
|
|
|
}
|