Widget - Infomaker/Dashboard-Plugin GitHub Wiki
Dashboard.Widget
Widgets is often used in conjunction with agents or applications in plugin. A widget is a component that is rendered inside a popover component with an icon of plugin's thumbnail || graphic
image and it's only renders once in the Dashboard header upper right, even if you have multiple instances of the same application.
Simple Widget
class MyWidget extends Dashboard.Widget {
render() {
const writerWidgetItems = [
{
id: 'create-new-writer-article',
content: 'New article +'
onClick: () => this.createNewWriterArticle()
}
]
return <Dashboard.GUI.List items={writerWidgetItems}/>
}
}
In this example we create a simple widget that renders a List. A List returns a list of items that will fit nicely in widget popover component.