react-typestyle
Version:
A react integration of the TypeStyle ecosystem
25 lines (24 loc) • 944 B
TypeScript
import { FreeStyle } from 'free-style';
import { ClassNames, Plugin, StaticSheet, StaticStyle, updateListener } from '../types';
export interface Options {
plugins?: Plugin[];
}
declare class Registry {
protected freeStyle: FreeStyle;
protected listeners: updateListener[];
protected plugins?: Plugin[];
constructor({plugins}?: Options);
clear(): Registry;
getStyles(): string;
mount(registry: Registry): Registry;
off(listener: updateListener): Registry;
on(listener: updateListener): Registry;
sheet(object: StaticSheet): ClassNames;
style(object: StaticStyle): string;
toString(): string;
unmount(registry: Registry): Registry;
update(patch: FreeStyle, subtractive?: boolean): Registry;
protected publish(patch: FreeStyle, subtractive?: boolean): Registry;
protected registerStyle<P>(freeStyle: FreeStyle, style: StaticStyle, props?: P): string;
}
export default Registry;