INNER CODE UNIT · TypeScript
ReactWrapper
tachyons-css/react-native-style-tachyons · src/reactWrapper.ts:7
export class ReactWrapper {
private static styles: any = {}
private static options: any = {}
static configure(styles: any, options: any): any {
this.styles = styles
this.options = options
}
/*
* Wrap takes a Component or a render function and recursively replaces
* the prop 'cls' (or custom overridden prop name) with the respective 'style' definitions.
* Render functions are decorated so that when they are invoked the resulting
* element tree will be recursively evaluated and 'cls' will be replaced with
* 'style' definitions.
*/
static wrap(componentOrFunction: any): any {
if (!(componentOrFunction.prototype !== undefined && "render" in componentOrFunction.prototype)) {