// ============================================================================ // Component Templates // ============================================================================ export const layoutTemplate = `import { Link, Outlet, useLocation } from "react-router-dom"; import { Home, LayoutDashboard, Info } from "lucide-react"; const navItems = [ { to: "/", label: "Home", icon: Home }, { to: "/dashboard", label: "Dashboard", icon: LayoutDashboard }, { to: "/about", label: "About", icon: Info }, ]; export function Layout() { const location = useLocation(); return (
); } `; export const vannaButtonTemplate = `import type { ReactNode, ButtonHTMLAttributes } from "react"; type Variant = "primary" | "secondary" | "outline" | "ghost"; type Size = "sm" | "md" | "lg"; interface VannaButtonProps extends ButtonHTMLAttributes { variant?: Variant; size?: Size; children: ReactNode; } const variantStyles: Record = { primary: "bg-teal text-white hover:bg-teal/90 shadow-vanna", secondary: "bg-orange text-white hover:bg-orange/90", outline: "border-2 border-teal text-teal hover:bg-teal/10", ghost: "text-navy hover:bg-navy/10", }; const sizeStyles: Record = { sm: "px-3 py-1.5 text-sm", md: "px-4 py-2 text-sm", lg: "px-6 py-3 text-base", }; export function VannaButton({ variant = "primary", size = "md", children, className = "", ...props }: VannaButtonProps) { return ( ); } `; export const vannaCardTemplate = `import type { ReactNode } from "react"; interface VannaCardProps { children: ReactNode; className?: string; hover?: boolean; } export function VannaCard({ children, className = "", hover = false }: VannaCardProps) { return (
{children}
); } `; export const statsCardTemplate = `import type { ReactNode } from "react"; import { TrendingUp, TrendingDown } from "lucide-react"; interface StatsCardProps { title: string; value: string; change?: number; icon?: ReactNode; } export function StatsCard({ title, value, change, icon }: StatsCardProps) { const isPositive = change !== undefined && change >= 0; return (

{title}

{value}

{change !== undefined && (
{isPositive ? : } {isPositive ? "+" : ""}{change}%
)}
{icon && (
{icon}
)}
); } `;