Genesis
@stable

RelativeTime

A time as `relativeTime` says it, in the messages' words and locale, with the exact time (in `timeZone`) on hover. The server and the first paint show the exact time, so hydration matches; after mount it turns relative and keeps itself current each minute, on one clock shared by every RelativeTime on the page.

packages/ui/src/components/data/resource-view/display.tsx

Import
Subpath export: @marktiderman/genesis-ui/data
import { RelativeTime } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

RelativeTime

A time as `relativeTime` says it, in the messages' words and locale, with the exact time (in `timeZone`) on hover. The server and the first paint show the exact time, so hydration matches; after mount it turns relative and keeps itself current each minute, on one clock shared by every RelativeTime on the page.

PropTypeDefaultDescription
value*unknown—
classNamestring—
timeZonestring—

DisplayRenderersProvider

Replace some of the renderers for everything below (nested providers build on each other). Pass a stable object (a module constant or a `useMemo`): a new one each render redraws every column.

PropTypeDefaultDescription
renderers*Partial<Record<DisplayHint, DisplayRenderer>>—

useDisplayCell

Draw one cell: the empty mark for no value or a cell the row (or viewer) hides (`when`), else its hint's renderer.

No declared props.

relativeDatetimeRenderer

The `datetime` renderer as a relative time with the exact time on hover. Opt in under a `DisplayRenderersProvider`: `renderers={{ datetime: relativeDatetimeRenderer }}`.

No declared props.

webDisplayRenderers

Genesis's web renderers. Every one shows text it can't draw, never a broken cell.

No declared props.