From 2b960540cc478564ebd50fe5dd6a05986a7e9779 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Fri, 16 Jan 2026 15:03:59 +1300 Subject: [PATCH] feat(25-01): create TemplateCard component - Card layout with 48x48 icon area - Template name and 2-line description with line-clamp - Node count badge and category badge with color coding - Tag pills display (max 4 shown) - Loading state with spinner animation - Disabled state with reduced opacity - Hover states for interactive feedback --- src/components/quickstart/TemplateCard.tsx | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 src/components/quickstart/TemplateCard.tsx diff --git a/src/components/quickstart/TemplateCard.tsx b/src/components/quickstart/TemplateCard.tsx new file mode 100644 index 00000000..a26ee2d8 --- /dev/null +++ b/src/components/quickstart/TemplateCard.tsx @@ -0,0 +1,140 @@ +"use client"; + +import { TemplateCategory } from "@/types/quickstart"; + +interface TemplateCardProps { + template: { + id: string; + name: string; + description: string; + icon: string; + category: TemplateCategory; + tags: string[]; + }; + nodeCount: number; + isLoading: boolean; + onClick: () => void; + disabled: boolean; +} + +const CATEGORY_LABELS: Record = { + product: "Product", + style: "Style", + composition: "Composition", + community: "Community", +}; + +const CATEGORY_COLORS: Record = { + product: "bg-blue-500/20 text-blue-300", + style: "bg-purple-500/20 text-purple-300", + composition: "bg-green-500/20 text-green-300", + community: "bg-amber-500/20 text-amber-300", +}; + +export function TemplateCard({ + template, + nodeCount, + isLoading, + onClick, + disabled, +}: TemplateCardProps) { + return ( + + ); +}