@nextcloud/vue
Version:
Nextcloud vue components
20 lines (19 loc) • 919 B
TypeScript
import { DeepReadonly, MaybeRefOrGetter, 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 - computed boolean whether the dark theme is enabled
*/
export declare function useIsDarkThemeElement(el?: MaybeRefOrGetter<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.
* As well as any enforced theme by the `NcThemeProvider`.
*
* @return Computed boolean whether the dark theme is enabled
*/
export declare function useIsDarkTheme(): DeepReadonly<Ref<boolean>>;