apphouse
Version:
Component library for React that uses observable state management and theme-able components.
42 lines (41 loc) • 1.53 kB
TypeScript
import { CSSProperties } from 'glamor';
/**
* Helper function to determine if a property key is a selector
* @param styleKey
* @returns
*/
export declare const isSelector: (property: string) => boolean;
export default class CSS {
static parseCss: (css: string) => object;
static toJSONAttributes(cssString: string): object;
static getCssObjectWithCamelcaseProperties(values: any): object;
static getCssObjectWithDashedProperties(values: {
[id: string]: any;
}): object;
static isMediaQuery(value: string): boolean;
static getSelectorValues(cssString: string): object;
static toCssInJs(cssString: string): object;
static toCssInJsPrettified(value: string): string;
static toCssInJs2Prettified(value: string): string;
static fromCssInJsToJSONAttributes(value: {
[id: string]: object | string;
}): object;
static fromflatJSONToJSONAttributes(value: {
[id: string]: object;
}): object;
/**
* Convert JSON to CSS
* @param value JSON in string or object format to be converted to CSS
* @returns
*/
static fromCssInJstoCssString(value: {
[id: string]: object | string;
}, prettify?: boolean): string;
static prettify(value: string): string;
/**
* Finds all uppercase letters, converts them to lowercase and the sufix - before them
* @param str string in camelcase format
*/
static camelcaseToDashed(str: string): string;
static toCamelcase(css: CSSProperties): CSSProperties;
}