import type { LucideIcon } from "lucide-react"; import type { ReactNode } from "react"; import { Link } from "@/lib/router"; import { Card } from "./ui/card"; interface MetricCardProps { icon: LucideIcon; value: string | number; label: string; description?: ReactNode; to?: string; onClick?: () => void; /** Use the shared bordered Card surface instead of an unframed metric. */ appearance?: "plain" | "card"; } export function MetricCard({ icon: Icon, value, label, description, to, onClick, appearance = "plain" }: MetricCardProps) { const isClickable = !!(to || onClick); const content = (
{value}
{label}
{description && (