@laurabeatris/chakra-ui-flashless
Version:
Tools to implement flashless color modes in Chakra UI
20 lines (19 loc) • 659 B
TypeScript
import { ColorMode } from '@chakra-ui/react';
import { Dict } from '@chakra-ui/utils';
import { PropsWithChildren } from 'react';
export declare type Color = string | [string, number];
export declare type Variables = Record<string, [Color, Color]>;
export declare type ColorModeToggleProps = PropsWithChildren<{
theme: Dict;
customVariables: Variables;
initialColorMode?: ColorMode;
}>;
export declare type ColorModeContextValue = {
colorMode: ColorMode;
toggleColorMode: () => void;
};
export declare type ToggleColorVariablesParameters = {
theme: Dict;
colorMode: ColorMode;
customVariables: Variables;
};