UNPKG

@nextcloud/vue

Version:
19 lines (18 loc) 760 B
/** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ /** * Check whether the dark theme is used on a specific element * * @param el - Element to check for dark theme, which is used for `data-theme-*` checking (default is `document.body`) * @return Whether the dark theme is enabled via Nextcloud theme */ export declare function checkIfDarkTheme(el?: HTMLElement): boolean; /** * Whether the dark theme is enabled in Nextcloud. * The variable is defined on page load and not reactive. * Use `checkIfDarkTheme` if you need to check it at a specific moment. * Use `useDarkTheme` if you need a reactive variable in a Vue component. */ export declare const isDarkTheme: boolean;