JSFiddle - React, Tailwind, and code Playground

by amiramix

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dijit/themes/claro/claro.css">
<div id="select" class="claro"></div>
<span id="checkBox" class="claro"></span><label for="checkBox"> I agree</label>

JavaScript

require([
    "dojo/ready",
    "dijit/form/Select",
    "dijit/form/CheckBox",
    "dojo/domReady!"], function (ready, Select, CheckBox) {

    new Select({
        name: "select2",
        title: "some title",
        options: [{
            label: "TN",
            value: "Tennessee"
        }, {
            label: "VA",
            value: "Virginia",
            selected: true
        }, {
            label: "WA",
            value: "Washington"
        }, {
            label: "FL",
            value: "Florida"
        }, {
            label: "CA",
            value: "California"
        }]
    }).placeAt("select");

    new CheckBox({
        name: "checkBox",
        checked: false,
        label: "some label",
        onChange: function (b) {
            alert('onChange called with parameter = ' + b + ', and widget value = ' + this.get('value'));
        }
    }).placeAt("checkBox");
});