components/bits/statusToken#
statusTokens()#
The token set for a tone.
Parameters#
| Parameter | Type |
|---|---|
tone |
StatusTone |
Returns#
statusToToken()#
Normalises a backend status word onto a tone.
Parameters#
| Parameter | Type |
|---|---|
status |
string | null | undefined |
Returns#
StatusTokens#
Properties#
fg#
Text colour readable on the app ground (NOT on main).
main#
Solid fill / dot colour.
onSolid#
Ink for text sitting on top of main.
soft#
Tinted background for chips and soft badges.
StatusTone#
One status vocabulary for the whole app.
Before this, six near-identical getStatusColor maps lived in component
files (the pair in audit/TraceDetails.tsx and audit/SpanDetails.tsx was
byte-for-byte identical) and 27 status dots were hand-rolled as a Box with
borderRadius: '50%' and whatever colour was nearest to hand. Half of them
used MUI palette words, which — before the palette was fixed — were a
different red and green from the --status-* ramp the rest of the app paints
with.
The tone is the unit of meaning; the CSS custom properties are the unit of paint. Everything in the UI layer should reason in tones.