src/transformer.js
function transformClasses(value) {
        if (t.isStringLiteral(value)) {
            value.value.split(" ").forEach(function(cls) {
                renderer.addClass(cls);
            });
        } else if (t.isJSXExpressionContainer(value)){
            renderer.handleClasses(value.expression);
        } else {
            error(value, "Unknown class specification type.");
        }
    }
function transformClasses(value) {
        if (t.isStringLiteral(value)) {
            value.value.split(" ").forEach(function(cls) {
                renderer.addClass(cls);
            });
        } else if (t.isJSXExpressionContainer(value)){
            renderer.handleClasses(value.expression);
        } else {
            error(value, "Unknown class specification type.");
        }
    }
function transformClasses ( value ) { if ( t . isStringLiteral ( value ) ) { value . value . split ( " " ) . forEach ( function ( cls ) { renderer . addClass ( cls ) ; } ) ; } else if ( t . isJSXExpressionContainer ( value ) ) { renderer . handleClasses ( value . expression ) ; } else { error ( value , "Unknown class specification type." ) ; } }
Transforms the class specification into either a sequence of add-class
renderer calls or a handler function call.
Transforms the class specification into either a sequence of add - class renderer calls or a handler function call .