mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(layout): add terminal layout with Tabs and ScrollArea for testcase display
This commit is contained in:
parent
37fdbc1cdc
commit
f4078cb985
30
src/app/(app)/problems/[id]/@terminal/layout.tsx
Normal file
30
src/app/(app)/problems/[id]/@terminal/layout.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import { SquareCheckIcon } from "lucide-react";
|
||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
|
||||
interface TerminalLayoutProps {
|
||||
testcase: React.ReactNode;
|
||||
}
|
||||
|
||||
export default function TerminalLayout({ testcase }: TerminalLayoutProps) {
|
||||
return (
|
||||
<Tabs defaultValue="testcase" className="h-full flex flex-col">
|
||||
<ScrollArea className="h-9 flex-none bg-muted">
|
||||
<TabsList>
|
||||
<TabsTrigger value="testcase">
|
||||
<SquareCheckIcon
|
||||
className="-ms-0.5 me-1.5 opacity-60"
|
||||
size={16}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Testcase
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
<ScrollBar orientation="horizontal" />
|
||||
</ScrollArea>
|
||||
<TabsContent value="testcase" className="h-full mt-0">
|
||||
{testcase}
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user