Files
aragrp/components/playground/playground-scenarios-card.tsx
T
alirez.brandCursor a47ec493c5 feat: add version history drawer with release notes
Introduce a footer-triggered Version History drawer with categorized release notes, hardcoded release data, and semver tracking at v0.3.0. Also ships blog blockquote/table styling, site-wide typography, home page image updates, header refinements, and related bug fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 02:46:20 +03:30

69 lines
2.0 KiB
TypeScript

"use client";
import { Wand2 } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { cn } from "@/lib/utils";
import { type } from "@/lib/typography";
import { PLAYGROUND_SCENARIOS } from "./playground-prompts";
export { PLAYGROUND_SCENARIOS };
interface PlaygroundScenariosCardProps {
onSelectScenario: (scenarioId: string, prompt: string) => void;
disabled?: boolean;
activeScenarioId?: string | null;
}
export function PlaygroundScenariosCard({
onSelectScenario,
disabled = false,
activeScenarioId = null,
}: PlaygroundScenariosCardProps) {
return (
<Card className="h-full">
<CardHeader className="pb-4">
<div className="flex items-center gap-2">
<div className="flex size-8 items-center justify-center rounded-lg bg-primary/10 text-primary">
<Wand2 className="size-4" aria-hidden />
</div>
<div>
<CardTitle>سناریوهای آماده</CardTitle>
<CardDescription>
شروع سریع با پرامپت‌های نمونه
</CardDescription>
</div>
</div>
</CardHeader>
<CardContent>
<div className="flex flex-wrap gap-2">
{PLAYGROUND_SCENARIOS.map((scenario) => (
<Button
key={scenario.id}
type="button"
variant={activeScenarioId === scenario.id ? "default" : "outline"}
size="sm"
disabled={disabled}
onClick={() => onSelectScenario(scenario.id, scenario.prompt)}
className={cn(
"h-auto min-h-8 whitespace-normal rounded-full px-3 py-1.5",
type.caption,
activeScenarioId === scenario.id && "shadow-sm"
)}
>
{scenario.label}
</Button>
))}
</div>
</CardContent>
</Card>
);
}