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
Johan Sundén edited this page Nov 11, 2016
·
12 revisions
Widgets is often used in conjunction with agents or applications in plugin. A widget is a component that is only rendered once in the Dashboard header upper right, even if you have multiple instances of the same application.
js
class MyWidget extends Dashboard.Widget {
render() {
return <Dashboard.GUI.WidgetButton text="My widget" onClick={() => console.log("Clicked on My widget")} />
}
}
In this example we create a simple widget that renders a WidgetButton. A WidgetButton returns a button that will fit nicely in the header of the Dashboard.