import { useExplain } from './ExplainButton.jsx'; /** Headline stat tile (FINAL_SPEC §5.1): value + label + optional hint/delta * + the AI-explain icon top-right; the answer strip renders at the BOTTOM of * the tile, under a hairline divider (§5.1/§7.4). Tone tinting is retired — * tone lives in the delta pill, never the tile chrome; `value` always * renders in `--ink`. */ export default function StatTile({ label, value, hint, delta, buildExplainQuestion }) { const { button: explainBtn, strip: explainStrip } = useExplain({ label, buildQuestion: buildExplainQuestion, }); return (
{label}
{explainBtn}
{value}
{hint &&
{hint}
} {delta && (
{delta.text}
)} {explainStrip}
); }