Creates a new instance of ToggleElementButton.
Parameters:
Name |
Type |
Description |
properties |
ItemProperties
|
An object that contains the properties of the ToggleElementButton. |
Properties:
Name |
Type |
Argument |
Description |
properties.toggleElement |
string
|
|
The dataElement of the element to toggle. |
properties.label |
string
|
<optional>
|
The label of the button. |
properties.img |
string
|
<optional>
|
The title of the button which appears in a tooltip. |
Example
const toggleButton = new instance.UI.Components.ToggleElementButton({
label: 'Toggle',
title: 'Toggle the visibility of the element',
img: 'icon-save',
toggleElement: 'elementToToggle',
});