UNPKG

@scalar/api-client

Version:

the open source API testing client

20 lines 1.05 kB
import type { WorkspaceStore } from '@scalar/workspace-store/client'; import type { ColorMode } from '@scalar/workspace-store/schemas/workspace'; import { type MaybeRefOrGetter } from 'vue'; /** * Composable hook that manages color mode (dark/light/system) based on workspace store configuration. * Automatically listens to system preference changes when mode is set to 'system'. * * @param options - Configuration options for the color mode hook. * @param options.workspaceStore - The workspace store instance that contains the color mode preference. * @returns Reactive color mode state and computed properties. */ export declare const useColorMode: ({ workspaceStore }: { workspaceStore: MaybeRefOrGetter<WorkspaceStore | null>; }) => { /** The current color mode from the workspace store (reactive). */ colorMode: import("vue").ComputedRef<ColorMode>; /** Whether the current effective color mode is dark (reactive). */ isDarkMode: import("vue").ComputedRef<boolean>; }; //# sourceMappingURL=use-color-mode.d.ts.map