UNPKG

apphouse

Version:

Component library for React that uses observable state management and theme-able components.

32 lines (31 loc) 1.39 kB
import { CSSProperties } from 'glamor'; import { Theme } from '../themes/Theme'; import { CssPropertyStyle } from '../themes/style.interface'; /** * Get styles for focus events * @param keyboard styles for keyboard focus * @param mouse styles for mouse focus * @returns */ export declare function createFocusPseudoclassicSelector(keyboard: CSSProperties): CSSProperties; export declare const parseCssPropertyStyle: (value: CssPropertyStyle[]) => string; export declare const toCss: (value: CssPropertyStyle[]) => object; export declare class StyleUtils { /** * Convert Css Properties into CssPropertyStyle[] * @param value style in the format of CssProperties (css in JS) * @param lookup a lookup table to convert css properties to css property styles, if available * @param namespace to better create the style, we can namespace the style this is the value that * that will be used to create the base component * @returns CssPropertyStyle[] */ static toCssPropertyStyle: (value: CSSProperties, lookup: { [id: string]: string; }, namespace?: string) => CssPropertyStyle[]; /** * Convert a themed or tokenized style to a css style with raw values * @param style with color or design tokens * @returns css style with raw values */ static toRawStyle: (style: CSSProperties, theme: Theme) => CSSProperties; }