UNPKG

@twstyled/theme

Version:

Runtime theming support for twstyled -- the full-featured Tailwind CSS + CSS in JS Compiler

22 lines (21 loc) 623 B
import * as React from 'react'; import type { Dispatch, SetStateAction } from 'react'; import type { Theme, ColorMode } from './types'; export interface ThemeContextProps { theme: Theme; colorMode: ColorMode; setColorMode: (colorMode: ColorMode) => void; } export declare const useTheme: () => Theme; export declare const useColors: () => import("./types").Colors & { modes: { dark: import("./types").Colors; }; }; export declare function useColorMode<T extends string = string>(): [ T, Dispatch<SetStateAction<T>> ]; export declare const ThemeProvider: React.FC<{ theme: Theme; }>;