mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
feat(playground): add AI layout with bot tab
This commit is contained in:
parent
da92cd49bc
commit
6f26be6119
32
src/app/(app)/problems/[id]/@ai/layout.tsx
Normal file
32
src/app/(app)/problems/[id]/@ai/layout.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { BotIcon } from "lucide-react";
|
||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
|
||||
interface AiLayoutProps {
|
||||
bot: React.ReactNode;
|
||||
}
|
||||
|
||||
export default function AiLayout({
|
||||
bot,
|
||||
}: AiLayoutProps) {
|
||||
return (
|
||||
<Tabs defaultValue="bot" className="h-full flex flex-col">
|
||||
<ScrollArea className="h-9 flex-none bg-muted">
|
||||
<TabsList>
|
||||
<TabsTrigger value="bot">
|
||||
<BotIcon
|
||||
className="-ms-0.5 me-1.5 opacity-60"
|
||||
size={16}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Bot
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
<ScrollBar orientation="horizontal" />
|
||||
</ScrollArea>
|
||||
<TabsContent value="bot" className="h-full mt-0">
|
||||
{bot}
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user