FormatDuration
Prints how long something took in its two largest units — 1h 30m, 30m 23s, 45s — so a column of run times stays short and comparable. When smaller units are dropped, the exact duration sits in a tooltip behind a dashed underline. value takes milliseconds or an ISO 8601 duration (PT2M13S); formatDuration() returns the same text as a string.
Usage
Examples
Truncated
Two units are shown; the rest moves into the tooltip, so 1h 4m 30s reads 1h 4m
with the exact figure on hover. tooltip={false} drops the tooltip and the underline.
Iso duration
An ISO 8601 duration from an API contract renders as is, without converting it first.
Null value
null and undefined render an em dash with 'No data' on hover; a negative or
unparsable value renders a bare em dash.
Inherit typography
typography='inherit' renders a plain span, so the duration takes its font, size,
weight and colour from the parent.