import clsx from "clsx"; import type { ReactNode } from "react"; import Badge from "@/components/ui/Badge"; export interface MetricDefCardProps { /** short symbol, e.g. "CS-WER" */ abbr: string; /** spelled-out name, e.g. "Code-switch word error rate" */ name: string; /** mono formula line; omit on roadmap ghosts without a fixed definition */ formula?: string; /** "lower is better" / "higher is better" */ direction?: string; /** ghost treatment for roadmap metrics */ roadmap?: boolean; children: ReactNode; className?: string; } /** Typeset metric definition card: serif symbol, mono formula, prose gloss. */ export default function MetricDefCard({ abbr, name, formula, direction, roadmap = false, children, className, }: MetricDefCardProps) { return (
{name}
{formula && (
{formula}
)}
{children}