Setting.addToggle method
Setting › addToggle
Official
Add a toggle to the setting.Signature:
addToggle(cb: (component: ToggleComponent) => unknown): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| cb | (component: ToggleComponent) => unknown | The callback to add the toggle. |
Returns: this — The setting.
Since: 0.9.7
Example:
setting.addToggle((toggle) => { toggle.setValue(true);});