JSFiddle - React, Tailwind, and code Playground

by Leo

HTML

<div id="root"></div>

CSS

#root
{
  width: 300px;
  height: 300px;
  background-color: yellow;
}

JavaScript

var root = document.getElementById("root");


function createLoeElement()
{
   var log = document.createElement("div");
   log
}

var createDialog = document.createElement("div");
createDialog.style.width = "100%";
createDialog.style.height = "100%";
createDialog.style.backgroundColor = "pink";

var creationForm = document.createElement("div");
creationForm.style.width = "100%";
creationForm.style.height = "250px";
creationForm.style.backgroundColor = "grey";


var button = document.createElement("button");
button.innerText = 'Create';
button.onclick = function()
{
    window.alert("created");
}

createDialog.appendChild(creationForm);
createDialog.appendChild(button);

root.appendChild(createDialog);