JSFiddle - React, Tailwind, and code Playground

by Jeremy Bolanos

HTML

<div id="box"></div>

JavaScript

function drawBox() {
    $('#box').css({
        'width': x.width,
        'height': x.height,
        'background-color': x.bgcolor,
        'border-width': x.border,
        'border-color': x.bcolor
    }).html(x.content.one);

}

var x = {
    content: {
        one: 'Hello World',
        two: 'You See Me'
    },
    height: '200',
    width: '200',
    bgcolor: 'rgba(0,0,0,0.25)',
    border: '1',
    bcolor: 'rgba(0,0,0,0.5)'
};
drawBox.apply(this, x);