Skip to main content

Interface: WidgetPreviewProps

Properties

renderWidget

renderWidget: (props: { width: number ; height: number }) => Element

Callback function that will be called by WidgetPreview to generate the widget UI.

Type declaration

▸ (props): Element

Callback function that will be called by WidgetPreview to generate the widget UI.

Parameters
NameType
propsObject
props.widthnumber
props.heightnumber
Returns

Element


height

height: number

The height of the widget


width

width: number

The width of the widget


onClick

Optional onClick: (props: OnClick) => void

Callback function that will be called when clicked on a clickable area of the widget.

Type declaration

▸ (props): void

Callback function that will be called when clicked on a clickable area of the widget.

Parameters
NameType
propsOnClick
Returns

void


showBorder

Optional showBorder: boolean

Whether to show a border around the widget. Usefull for widgets that do not use the whole space.


highlightClickableAreas

Optional highlightClickableAreas: boolean

Whether to add a highlight to the clickable areas