WidgetGrid
A dashboard's widgets on a responsive grid: one column on a phone, `columns` at the widest, with a chart or a list spanning more. For the stat row of a `DashboardPage`, pass `<Widget>`s to its `stats` instead: that row is a grid already.
packages/ui/src/components/data/widget/WidgetGrid.tsx
Import
Subpath export:
@marktiderman/genesis-ui/dataimport { WidgetGrid } from "@marktiderman/genesis-ui/data";Components
Auto-generated from TypeScript source via
react-docgen-typescript.WidgetGrid
A dashboard's widgets on a responsive grid: one column on a phone, `columns` at the widest, with a chart or a list spanning more. For the stat row of a `DashboardPage`, pass `<Widget>`s to its `stats` instead: that row is a grid already.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | More tiles after the widgets: a `StatCard`, a `<Widget>` with its own props. |
| className | string | — | |
| columns | enum | 4 | Columns at the widest breakpoint (Grid's scale). Default 4. |
| linkComponent | LinkComponent | — | Router link for `href` and `rowHref`. Default a plain `<a>`. |
| locale | string | — | Number locale (`Intl`). Default the runtime's. |
| refused | ((reason: string) => ReactNode) | — | Shown in place of the tile when the viewer may not see it. Default nothing. |
| rowHref | ((row: Record<string, unknown>) => string) | — | A list widget's link for one row (its record page). |
| testID | string | — | |
| widgets | readonly (DefinedWidget | WidgetDefinition | WidgetGridItem)[] | [] | The widgets, in order: each a widget, or `{ widget, span }`. |