mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { CodeXmlIcon } from "lucide-react";
|
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
|
|
interface WorkspaceLayoutProps {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) {
|
|
return (
|
|
<Tabs defaultValue="code" className="h-full flex flex-col">
|
|
<ScrollArea className="h-9 flex-none bg-muted">
|
|
<TabsList className="gap-1 bg-transparent">
|
|
<TabsTrigger
|
|
value="code"
|
|
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-full data-[state=active]:shadow-none"
|
|
>
|
|
<CodeXmlIcon
|
|
className="-ms-0.5 me-1.5 opacity-60"
|
|
size={16}
|
|
aria-hidden="true"
|
|
/>
|
|
Code
|
|
</TabsTrigger>
|
|
</TabsList>
|
|
<ScrollBar orientation="horizontal" />
|
|
</ScrollArea>
|
|
<TabsContent value="code" className="grow mt-0">
|
|
{children}
|
|
</TabsContent>
|
|
</Tabs>
|
|
);
|
|
}
|