@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
17 lines (16 loc) • 506 B
TypeScript
import type { ColorMode } from "../types.js";
/**
* React single-page-application helper to apply a Bifrost color mode to the
* root document element.
*
* Avoid for Next.js or other Server-Side frameworks where you can control the
* `<html>` element directly.
*
* @param mode Can be one of "light", "dark", or "system".
*
* @see https://bifrost.intility.com/react/useApplyColorMode
*
* @example
* useApplyColorMode("dark");
*/
export default function useApplyColorMode(mode: ColorMode): void;