CorePluginToggleComponentConstructorParams
Parameters for the CorePluginToggleComponent constructor.
Import:
import type { CorePluginToggleComponentConstructorParams } from 'obsidian-dev-utils/obsidian/components/core-plugin-toggle-component';Signature:
export interface CorePluginToggleComponentConstructorParamsProperties
| Property | Type | Description |
|---|---|---|
| app | App | The Obsidian app instance. |
| corePluginId | InternalPluginNameType | The id of the core plugin to watch, e.g. InternalPluginName.Canvas. |
| onDisable? | () => Promisable<void> | Runs each time the core plugin goes from enabled to disabled. |
| onEnable? | () => Promisable<void> | Runs each time the core plugin goes from disabled to enabled, and once on load when the core plugin is already enabled then. |
| shouldCallOnDisableOnUnload? | boolean | Whether onDisable also runs when this component unloads while the core plugin is enabled, so every onEnable is balanced by one onDisable. Defaults to false: the core plugin did not change, so a consumer that republishes transitions must not see one. |