UNPKG

@twstyled/theme

Version:

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

13 lines (12 loc) 779 B
import * as React from 'react'; import { SetStateAction } from 'react'; import type { Theme, ColorMode } from './types'; export interface ContextValue { colorMode?: string; setColorMode?: (colorMode: SetStateAction<string>) => void; } export declare const useColorModeState: (theme?: Theme) => readonly [ColorMode, React.Dispatch<React.SetStateAction<ColorMode>>]; export declare const applyColorMode: (theme: Theme, mode: string) => Theme; export declare const InitializeColorMode: () => JSX.Element; export declare const toCustomProperties: (obj: Record<string, any> | undefined, parent?: string | undefined, themeKey?: string | undefined) => Record<string, any>; export declare const objectToVars: (parent: string, obj: Record<string, any>) => Record<string, object>;