Skip to main content

UseTheme

What useTheme returns.

This is an interface exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import type { UseTheme } from "@mapcairn/map";

interface UseTheme

Properties​

choice​

readonly choice: ThemeChoice;

What the user chose: system, light or dark.

resolved​

readonly resolved: ResolvedTheme;

What is actually shown.

setChoice​

readonly setChoice: (choice: ThemeChoice) => void;

Stores the person's choice of system, light or dark. It takes effect at once.

See also​

Source: packages/map/src/services/hooks.ts:261