obsidian/ToggleComponent
Mock of Obsidian’s ToggleComponent, an on/off switch.
Classes
Section titled “Classes”| Class | Description |
|---|---|
| ToggleComponent | Mock of Obsidian’s ToggleComponent. The on/off state is kept in ToggleComponent.on. As in Obsidian, ToggleComponent.setValue calls the change callback only when the value actually changes, and ToggleComponent.onClick flips the toggle unless it is disabled. |