mirror of
https://litchi.icu/ngc2207/judge4c-latest.git
synced 2025-07-13 23:34:34 +00:00
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
|
import {
|
||
|
ResizableHandle,
|
||
|
ResizablePanel,
|
||
|
ResizablePanelGroup,
|
||
|
} from "@/components/ui/resizable";
|
||
|
|
||
|
export default async function ProblemLayout({
|
||
|
children,
|
||
|
description,
|
||
|
answer,
|
||
|
console,
|
||
|
}: {
|
||
|
children: React.ReactNode;
|
||
|
description: React.ReactNode;
|
||
|
answer: React.ReactNode;
|
||
|
console: React.ReactNode;
|
||
|
}) {
|
||
|
return (
|
||
|
<div className="h-full rounded-b-xl">
|
||
|
{children}
|
||
|
<ResizablePanelGroup direction="horizontal" className="gap-0.5 p-2 pt-0">
|
||
|
<ResizablePanel
|
||
|
defaultSize={25}
|
||
|
className="hidden lg:block border rounded-lg"
|
||
|
>
|
||
|
{description}
|
||
|
</ResizablePanel>
|
||
|
<ResizableHandle className="hidden lg:block bg-transparent hover:bg-cyan-500" />
|
||
|
<ResizablePanel defaultSize={50} className="border rounded-lg">
|
||
|
{answer}
|
||
|
</ResizablePanel>
|
||
|
<ResizableHandle className="hidden xl:block bg-transparent hover:bg-cyan-500" />
|
||
|
<ResizablePanel
|
||
|
defaultSize={25}
|
||
|
className="hidden xl:block border rounded-lg"
|
||
|
>
|
||
|
{console}
|
||
|
</ResizablePanel>
|
||
|
</ResizablePanelGroup>
|
||
|
</div>
|
||
|
);
|
||
|
}
|