@nextcloud/vue
Version:
Nextcloud vue components
16 lines (15 loc) • 872 B
TypeScript
import { DeepReadonly, Ref } from 'vue';
/**
* Check whether the dark theme is enabled on a specific element.
* If you need to check an entire page, use `useIsDarkTheme` instead for better performance.
* Reacts on element attributes change and system theme change.
* @param el - The element to check for the dark theme enabled on (default is `document.body`)
* @return {DeepReadonly<Ref<boolean>>} - computed boolean whether the dark theme is enabled
*/
export declare function useIsDarkThemeElement(el?: HTMLElement): DeepReadonly<Ref<boolean>>;
/**
* Shared composable to check whether the dark theme is enabled on the page.
* Reacts on body data-theme-* attributes change and system theme change.
* @return {DeepReadonly<Ref<boolean>>} - computed boolean whether the dark theme is enabled
*/
export declare const useIsDarkTheme: () => Readonly<Ref<boolean>>;