mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
feat(workspace): add workspace layout component with tabs and editor
This commit is contained in:
parent
a78431fb61
commit
6b34110aad
30
src/app/(app)/problems/[id]/@workspace/layout.tsx
Normal file
30
src/app/(app)/problems/[id]/@workspace/layout.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import { SquarePenIcon } from "lucide-react";
|
||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
|
||||
interface WorkspaceLayoutProps {
|
||||
editor: React.ReactNode;
|
||||
}
|
||||
|
||||
export default function WorkspaceLayout({ editor }: WorkspaceLayoutProps) {
|
||||
return (
|
||||
<Tabs defaultValue="editor" className="h-full flex flex-col">
|
||||
<ScrollArea className="bg-muted">
|
||||
<TabsList>
|
||||
<TabsTrigger value="editor">
|
||||
<SquarePenIcon
|
||||
className="-ms-0.5 me-1.5 opacity-60"
|
||||
size={16}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Editor
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
<ScrollBar orientation="horizontal" />
|
||||
</ScrollArea>
|
||||
<TabsContent value="editor" className="h-full mt-0">
|
||||
{editor}
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user