Skip to content

Setting.addToggle method

Setting › addToggle

Official

Add a toggle to the setting.

Signature:

addToggle(cb: (component: ToggleComponent) => unknown): this

Parameters:

Parameter Type Description
cb (component: ToggleComponent) => unknown The callback to add the toggle.

Returns: thisThe setting.

Since: 0.9.7

Example:

setting.addToggle((toggle) => {
toggle.setValue(true);
});