mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-19 08:06:33 +00:00
31 lines
796 B
TypeScript
31 lines
796 B
TypeScript
import {
|
|
ResizableHandle,
|
|
ResizablePanel,
|
|
ResizablePanelGroup,
|
|
} from "@/components/ui/resizable";
|
|
|
|
interface PlaygroundLayoutProps {
|
|
description: React.ReactNode;
|
|
workspace: React.ReactNode;
|
|
}
|
|
|
|
export default function PlaygroundLayout({
|
|
description,
|
|
workspace,
|
|
}: PlaygroundLayoutProps) {
|
|
return (
|
|
<ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0">
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
|
|
{description}
|
|
</ResizablePanel>
|
|
<ResizableHandle
|
|
withHandle
|
|
className="w-0.5 bg-transparent hover:bg-blue-500 mx-0.5"
|
|
/>
|
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
|
|
{workspace}
|
|
</ResizablePanel>
|
|
</ResizablePanelGroup>
|
|
);
|
|
}
|