JSFiddle - React, Tailwind, and code Playground

by chriswilsondc

JavaScript

var paper = Raphael(0, 0, 500, 500);

var mysquare = paper.rect(25, 25, 50, 50).attr("fill", "red");

mysquare.click(function() {
   this.attr("fill", "blue"); 
});