mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
refactor(layout): rename WorkspaceLayout to PlaygroundLayout and modify props
This commit is contained in:
parent
4f6a37df17
commit
a7799af2f4
@ -1,17 +1,17 @@
|
|||||||
import { WorkspaceHeader } from "@/components/workspace-header";
|
import { WorkspaceHeader } from "@/components/workspace-header";
|
||||||
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
||||||
|
|
||||||
interface WorkspaceLayoutProps {
|
interface PlaygroundLayoutProps {
|
||||||
problem: React.ReactNode;
|
problem: React.ReactNode;
|
||||||
editor: React.ReactNode;
|
workspace: React.ReactNode;
|
||||||
terminal: React.ReactNode;
|
terminal: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function WorkspaceLayout({
|
export default function PlaygroundLayout({
|
||||||
problem,
|
problem,
|
||||||
editor,
|
workspace,
|
||||||
terminal,
|
terminal,
|
||||||
}: WorkspaceLayoutProps) {
|
}: PlaygroundLayoutProps) {
|
||||||
return (
|
return (
|
||||||
<div className="h-screen flex flex-col">
|
<div className="h-screen flex flex-col">
|
||||||
<WorkspaceHeader />
|
<WorkspaceHeader />
|
||||||
@ -24,7 +24,7 @@ export default function WorkspaceLayout({
|
|||||||
<ResizablePanel defaultSize={50}>
|
<ResizablePanel defaultSize={50}>
|
||||||
<ResizablePanelGroup direction="vertical">
|
<ResizablePanelGroup direction="vertical">
|
||||||
<ResizablePanel defaultSize={75} className="border border-muted rounded-3xl">
|
<ResizablePanel defaultSize={75} className="border border-muted rounded-3xl">
|
||||||
{editor}
|
{workspace}
|
||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
<ResizableHandle className="my-1 bg-transparent hover:bg-blue-500" />
|
<ResizableHandle className="my-1 bg-transparent hover:bg-blue-500" />
|
||||||
<ResizablePanel defaultSize={25} className="border border-muted rounded-3xl">
|
<ResizablePanel defaultSize={25} className="border border-muted rounded-3xl">
|
||||||
|
Loading…
Reference in New Issue
Block a user