How to use the @reshadow/core.KEYS.__classProp__ function in @reshadow/core

To help you get started, we’ve selected a few @reshadow/core 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 / vue / index.js View on Github external
import styled, {
    map as _map,
    css,
    create,
    set,
    __css__,
    KEYS,
} from '@reshadow/core';

KEYS.__classProp__ = 'class';

const map = (element, data) => {
    if (!data.attrs) return data;
    data.attrs.class = data.class;
    data.attrs.style = data.style;
    data.attrs = _map(element, data.attrs);
    data.class = data.attrs.class;
    data.style = data.attrs.style;
    delete data.attrs.class;
    delete data.attrs.style;
    return data;
};

const use = obj => {
    const result = {attrs: {}};
    result.attrs[KEYS.__use__] = obj;
github lttb / reshadow / packages / babel / index.js View on Github external
module.exports = (babel, pluginOptions = {}) => {
    const options = Object.assign({}, defaultOptions, pluginOptions);

    const classProp = options.classProp || KEYS.__classProp__;

    if (options.target === 'preact') {
        if (pluginOptions.stringStyle !== undefined) {
            options.stringStyle = true;
        }
    }

    let moduleName = '@reshadow/core';

    if (options.target === 'vue') {
        moduleName = '@reshadow/vue';
    }

    let STYLED = new Set();
    let IGNORE_TAGS = new Set();
    let BINDINGS = {};