How to use the @reshadow/runtime.wrap function in @reshadow/runtime

To help you get started, we’ve selected a few @reshadow/runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lttb / reshadow / packages / styled / index.js View on Github external
if (options.attrs) {
                    for (const attr in options.attrs) {
                        const value = options.attrs[attr];
                        props[attr] =
                            typeof value === 'function' ? value(props) : value;
                    }
                }
                props.theme = props.theme || contextTheme;
                const as = props.as || tag;
                const localValues = this.mapValues(props);

                let localWrapper = wrapper;

                if (localMixin) {
                    localWrapper = wrap(elementClassName, [...strs, '']);

                    while (typeof localMixin === 'function') {
                        localMixin = localMixin(props);
                    }

                    if (typeof localMixin === 'string') {
                        localMixin = css([localMixin]);
                    }

                    localValues.push(localMixin);
                }

                const args = [localWrapper];

                args.push.apply(args, localValues);

@reshadow/runtime

reshadow runtime

MIT
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis

Similar packages