Genesis
@stable

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

Import
Subpath export: @marktiderman/genesis-ui/data
import { DateCell } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via 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.

PropTypeDefaultDescription
formatstring—
relativeboolean | "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.