Interface ControlsComponentButton

Definition of a button in the controls component.

interface ControlsComponentButton {
    class: string;
    handler?: ((e, id) => any);
    id: string;
    mode?: string;
    title: string;
}

Properties

class: string

css class to set on the button's DOM element

handler?: ((e, id) => any)

Handler for clicks (taps) on this button. If you provided a mode you don't need to provide this, as the action in that case is just changing the surface's mode.

Type declaration

    • (e, id): any
    • Parameters

      • e: MouseEvent
      • id: string

      Returns any

id: string

Button's id.

mode?: string

Optional surface mode to set when the button is pressed

title: string

Set as the button's DOM element's label attribute (a tooltip, effectively)