Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.
Rickard Hansson edited this page Sep 13, 2018 · 12 revisions

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.

Result

Screenshot of a example widget

Clone this wiki locally