function ThemeProvider
ThemeProvider(unnamed 0: ThemeProviderProps): React.JSX.Element

Provides ThemeContext. Each half of the theme goes through useThemeChoice, which sets it on the root element as data-style or data-color-scheme and mirrors it to localStorage, where an inline script in index.html applies it before the first paint, so the page doesn't flash another theme. The two must agree. When an account has no choice yet and this browser has one, it is saved to the account, once per session.

Parameters

Return Type

React.JSX.Element

Usage

import { ThemeProvider } from "src/contexts/theme/ThemeProvider.tsx";