@chakra-v2/styled-system
Version:
Style function for css-in-js building component libraries
38 lines (37 loc) • 1.21 kB
TypeScript
import { BaseThemeTypings } from "./shared.types";
import type { ThemeTypings as GeneratedThemeTypings } from "./theming.types";
/**
* This is a placeholder meant to be implemented via TypeScript's Module
* Augmentation feature and is an alternative to running `npx @chakra-v2/cli
* tokens`
*
* @example
* ```ts
* import { BaseThemeTypings } from "@chakra-v2/styled-system";
*
* type DefaultSizes = 'small' | 'medium' | 'large';
*
* declare module "@chakra-v2/styled-system" {
* export interface CustomThemeTypings extends BaseThemeTypings {
* // Example custom `borders` tokens
* borders: 'none' | 'thin' | 'thick';
* // ...
* // Other custom tokens
* // ...
* components: {
* Button: {
* // Example custom component sizes and variants
* sizes: DefaultSizes;
* variants: 'solid' | 'outline' | 'wacky' | 'chill';
* },
* // ...
* }
* }
* }
* ```
*
* @see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
*/
export interface CustomThemeTypings {
}
export type ThemeTypings = CustomThemeTypings extends BaseThemeTypings ? CustomThemeTypings : GeneratedThemeTypings;