UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

22 lines (19 loc) 930 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as react from 'react'; import { Dispatch, SetStateAction, PropsWithChildren } from 'react'; import { Translation } from './useTranslation.js'; import './useLanguage.js'; type ThemeType = 'light' | 'dark'; type ThemeTypeTranslation = Record<ThemeType, string>; declare const defaultThemeTypeTranslation: Translation<ThemeTypeTranslation>; type ThemeContextType = { theme: ThemeType; setTheme: Dispatch<SetStateAction<ThemeType>>; }; declare const ThemeContext: react.Context<ThemeContextType>; type ThemeProviderProps = { initialTheme?: ThemeType; }; declare const ThemeProvider: ({ children, initialTheme }: PropsWithChildren<ThemeProviderProps>) => react_jsx_runtime.JSX.Element; declare const useTheme: () => ThemeContextType; export { ThemeContext, ThemeProvider, type ThemeType, type ThemeTypeTranslation, defaultThemeTypeTranslation, useTheme };