Constructors
constructor
- new Button(__namedParameters: object): Button
Parameters
-
__namedParameters: object
-
-
icon: string
-
text: string
Properties
__variant__
__variant__: string = "Button"
Methods
Static fromJSON
- fromJSON(json: object): Button
Parameters
-
json: object
-
action: any
-
Optional icon?: string
-
Optional text?: string
A Widget that holds an Action, and when pressed on the client the action is run
example
new Button({icon:"power-on",action: new HttpAction({ name:"on", method:"GET", base:"https://device.ip", path:"turnOn" }) }) //JSX <Button icon="power-on" action={new HttpAction({ name:"on", method:"GET", base:"https://device.ip", path:"turnOn" })}/>