DateCell
DateCell -- shows relative date by default, formatted date otherwise. `relative: "short"` words it as `relativeTime` does ("2 hours ago", "yesterday", "Oct 21") instead of date-fns' distance ("about 2 hours ago"), in `words` (a screen's `useUiMessages().time`, so a translation applies) or the English catalogue. Compatible with DataTableColumn<T>'s `render` prop.
packages/ui/src/components/data/cell-formatters.tsx
@marktiderman/genesis-ui/dataimport { DateCell } from "@marktiderman/genesis-ui/data";react-docgen-typescript.DateCell
DateCell -- shows relative date by default, formatted date otherwise. `relative: "short"` words it as `relativeTime` does ("2 hours ago", "yesterday", "Oct 21") instead of date-fns' distance ("about 2 hours ago"), in `words` (a screen's `useUiMessages().time`, so a translation applies) or the English catalogue. Compatible with DataTableColumn<T>'s `render` prop.
| Prop | Type | Default | Description |
|---|---|---|---|
| format | string | — | |
| relative | boolean | "short" | — | |
| words | { locale: string; justNow: string; minutesAgo: string; inMinutes: string; now: string; minutesShort: string; yesterday: string; } | — |
NumberCell
NumberCell -- locale-aware number formatting.
No declared props.
CurrencyCell
CurrencyCell -- currency formatting with string-safe parsing.
No declared props.
BadgeCell
BadgeCell -- status badge with configurable color map.
No declared props.