/** * ResultDisplay.tsx * * Shows the computed circumference in several units inside a styled card. * When inputs are incomplete / invalid the component shows a helpful prompt. */ import type { CircumferenceResult } from "../types"; interface ResultDisplayProps { result: CircumferenceResult | null; } export default function ResultDisplay({ result }: ResultDisplayProps) { if (!result) { return (

Select or enter both rim and tire sizes to see the circumference.

); } /** Helper to render a single stat inside the stats bar. */ const stat_item = (title: string, value: string | number, desc: string) => (
{title}
{value}
{desc}
); return (

Wheel Circumference

{stat_item("Millimeters", result.mm, "mm")} {stat_item("Centimeters", result.cm, "cm")} {stat_item("Inches", result.inches, "in")}
); }