Skip to main content

resolveTheme

Turns the user's choice into the theme to show. "system" follows the operating system; an explicit choice wins.

This is a function exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import { resolveTheme } from "@mapcairn/core";

function resolveTheme(choice: ThemeChoice, systemTheme: ResolvedTheme): ResolvedTheme;

Parameters​

  • choice (ThemeChoice)
  • systemTheme (ResolvedTheme)

Returns​

ResolvedTheme

Remarks​

Must stay free of outside references: the inline bootstrap script is built from this function's source text.

See also​

Source: packages/core/src/theme/theme.ts:11