Skip to content

obsidian/ButtonComponent

Mock of Obsidian’s ButtonComponent, a button control for settings and modals.

Class Description
ButtonComponent Mock of Obsidian’s ButtonComponent. The button element is really created in the container, and styling calls toggle the same CSS classes Obsidian uses. As in Obsidian, a click on ButtonComponent.buttonEl runs the handler unless the button is disabled, with the mod-loading class on for as long as the handler is pending; ButtonComponent.simulateClick__ does the same without an event.