This repository was archived by the owner on Mar 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Widget
hamzahalhariri edited this page Mar 28, 2018
·
12 revisions
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.
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.