JSFiddle - React, Tailwind, and code Playground
by shoe788
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.10.0/dijit/themes/claro/claro.css">
JavaScript
require([
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/dom-construct",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dijit/_WidgetsInTemplateMixin",
"dijit/Dialog",
"dijit/form/Button",
], function (declare, lang, domConstruct, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, Dialog, Button) {
var CustomDialog = declare([Dialog], {
constructor: function (args, srcNodeRef) {
lang.mixin(this, args);
},
startup: function(){
this.inherited(arguments);
var ContentWidget = declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
templateString: "<div><button type='submit' data-dojo-type='dijit/form/Button'>Test</button></div>",
constructor: function (args, srcNodeRef) {
lang.mixin(this, args);
}
});
this.set("content", new ContentWidget());
}
});
var div = domConstruct.toDom("<div id='saveMapWidget'></div>");
domConstruct.place(div, document.body);
var widget = new CustomDialog({}, div);
widget.startup();
widget.show();
});