Options
All
  • Public
  • Public/Protected
  • All
Menu

A Widget that holds an Action and a DynamicValue, and when pressed on the client the action is run, and is highlighted based on the value of the DynamicValue

example

new ToggleButton({icon:"power-on",action: new HttpAction({
      name:"on",
      method:"GET",
      base:"https://device.ip",
      path:"turnOn"
   }),
   state:new ParsedValue(new TextValue("true"))
})
//JSX
<ToggleButton icon="power-on" state={new ParsedValue(new TextValue("true"))} action={new HttpAction({
      name:"on",
      method:"GET",
      base:"https://device.ip",
      path:"turnOn"
   })}/>

Hierarchy

  • ToggleButton

Implements

Constructors

Properties

Methods

Constructors

constructor

Parameters

  • __namedParameters: object

Returns ToggleButton

Properties

__variant__

__variant__: string = "ToggleButton"

action

action: Action

icon

icon: string

state

state: DynamicValue<boolean>

text

text: string

Methods

Static fromJSON

Parameters

  • json: object
    • action: any
    • Optional icon?: string
    • state: any
    • Optional text?: string

Returns ToggleButton

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.