Types
Import these from @grafloria/element.
Types
DashboardSnapshot
A whole board as plain data: every DashboardOptions field except the
function seams. dashboard({ ...snapshot, renderWidget }) rebuilds it.
Typed as an Omit rather than a hand-written twin on purpose — a field added
to DashboardOptions then joins the snapshot automatically instead of being
silently dropped, which is the exact failure this type exists to end.
tstype DashboardSnapshot = Omit<
DashboardOptions,
'renderWidget' | 'onLayoutChange' | 'views'
> & { views: DashboardViewSpec[] };
DragHandleOption
tstype DragHandleOption = boolean | string | DragGripOptions;
SectionCaption
false/absent: no band. true: the title. A string: that text.
tstype SectionCaption = false | true | string | SectionCaptionOptions;
WidgetRenderer
The signature every renderer here (and renderWidget) satisfies.
tstype WidgetRenderer = (widget: DashboardWidgetSpec, host: HTMLElement) => void;
Was this page helpful?