UNPKG

reablocks

Version:
19 lines (18 loc) 799 B
import { default as React, FC, PropsWithChildren } from 'react'; import { ReablocksTheme } from './themes/theme'; export interface ThemeContextProps { /** The active Reablocks theme. */ theme: ReablocksTheme; /** Map of CSS custom property tokens resolved from the current theme. */ tokens: Record<string, string>; /** Replaces the active theme with the provided one. */ updateTheme: (newTheme: ReablocksTheme) => void; /** Replaces the active token map with the provided one. */ updateTokens: (newTokens: Record<string, string>) => void; } export declare const ThemeContext: React.Context<ThemeContextProps>; interface ThemeProviderProps extends PropsWithChildren { theme: ReablocksTheme; } export declare const ThemeProvider: FC<ThemeProviderProps>; export {};