react-typestyle
Version:
A react integration of the TypeStyle ecosystem
29 lines (28 loc) • 904 B
TypeScript
import { FreeStyle } from 'free-style';
import { types } from 'typestyle';
export interface ClassNames {
[name: string]: string;
}
export declare type StaticStyle = Partial<types.NestedCSSProperties>;
export declare type StyleGenerator<P> = (props: P) => StaticStyle;
export interface StaticSheet {
[name: string]: StaticStyle;
}
export interface XDynamicSheet<P> {
[name: string]: StyleGenerator<P>;
}
export interface DynamicSheet<P> {
[name: string]: StyleGenerator<P> | StaticStyle;
}
export declare type SheetGenerator<P> = (props: P) => DynamicSheet<P>;
export declare type Plugin = (style: {
[property: string]: any;
}, type: string, renderer: any, props?: {
[key: string]: any;
}) => {
[property: string]: any;
};
export declare type updateListener = (patch: FreeStyle, subtractive?: boolean) => void;
export interface StylesTarget {
textContent: string | null;
}