UNPKG

@xcritical/theme

Version:
15 lines (14 loc) 1.49 kB
import { FlattenSimpleInterpolation } from 'styled-components'; import { IFont, ITheme, IThemeNamespace, OneOrManyString, IApperanceStateFunc } from '../interfaces'; interface IFuncStateTheme<T = ITheme> { (propertyPath?: string, defaultValue?: any): T; } export declare const getAppearancePath: (appearanceName?: string, propertyPath?: OneOrManyString | undefined) => string[]; export declare const mergeBaseTheme: import("micro-memoize").MicroMemoize.Memoized<(namespace: string, defaultTheme: ITheme, theme: IThemeNamespace) => ITheme>; export declare const getThemedState: (namespace: string, defaultTheme: ITheme) => import("micro-memoize").MicroMemoize.Memoized<(theme: IThemeNamespace<any> | undefined, propertyPath: OneOrManyString | undefined) => ITheme>; export declare const compileAppearanceTheme: import("micro-memoize").MicroMemoize.Memoized<(namespace: string, defaultTheme: ITheme, theme: IThemeNamespace, appearanceName: string, baseAppearanceName: string) => ITheme>; export declare function getStatesTheme<T>(theme: T, stateName: string, baseState?: string): IFuncStateTheme<T>; export declare function getAppearanceTheme<T>(namespace: string, defaultTheme: ITheme | ITheme<T>): IApperanceStateFunc<T>; export declare const getFontStyle: ({ size, weight, lineHeight, lineHeightRatio, }: IFont) => FlattenSimpleInterpolation; export declare const getFontObj: ({ size, weight, lineHeight, lineHeightRatio, }?: IFont) => React.CSSProperties; export {};