WidgetTile
The tile every widget draws. Use the component that names the job (`StatCard`, `HeadlineNumbers`, `SummaryCard`, `<Widget>`); reach for this one for a tile none of them draws, so it still wears the app style's tile parts.
packages/ui/src/components/data/widget/WidgetTile.tsx
Import
Subpath export:
@marktiderman/genesis-ui/dataimport { WidgetTile } from "@marktiderman/genesis-ui/data";Components
Auto-generated from TypeScript source via
react-docgen-typescript.WidgetTile
The tile every widget draws. Use the component that names the job (`StatCard`, `HeadlineNumbers`, `SummaryCard`, `<Widget>`); reach for this one for a tile none of them draws, so it still wears the app style's tile parts.
| Prop | Type | Default | Description |
|---|---|---|---|
| label* | string | — | What the tile is called. |
| children | ReactNode | — | Under the value: a bar, a list, a chart, a summary's body. |
| className | string | — | |
| detail | ReactNode | — | A short line under the value. |
| detailClassName | string | — | The detail's class (a tone's colour). |
| href | string | — | Makes the whole tile a link (stat, widget). |
| icon | ReactNode | LucideIcon | — | An icon beside the label (stat, widget) or the title (summary). |
| iconClassName | string | — | The icon's class (a colour). |
| kind | string | — | The widget kind, set as `data-kind` (widget). |
| linkComponent | LinkComponent | ({ href, children, testID, ...rest }) => ( <a href={href} data-testid={testID} {...rest}> {children} </a> ) | |
| meta | ReactNode | — | A short line on the header's right (summary, widget). |
| state | enum | ready | What a widget is showing; set as `data-state`. |
| testID | string | — | |
| value | ReactNode | — | The number, or whatever stands for it. |
| variant | enum | widget |