JSFiddle - React, Tailwind, and code Playground

by enyojs

JavaScript

enyo.kind({
    name: "BaseKind",
    components: [
        {name:"first", content: "This content comes from the base kind."}
    ]
});

var FirtUseMixin = {
    style: "background: lightblue;",
	create: enyo.inherit(function (sup) {
		return function () {
			sup.apply(this, arguments);
            this.createComponent({tag:"b", content:"First Use", addBefore:this.$.first});
            this.createComponent({tag:"b", content:"=== first ===");
		};
	})
};

var SmartWizardMixin = {
    style: "background: orange;",
	create: enyo.inherit(function (sup) {
		return function () {
			sup.apply(this, arguments);
            this.createComponent({tag:"b", content:"Smart Wizard", addBefore:this.$.first});
            this.createComponent({tag:"b", content:"=== smart ===");
		};
	})
};

enyo.kind({
    name: "FirstUseKind",
    kind: "BaseKind",
    mixins: ["FirtUseMixin"]
});
enyo.kind({
    name: "SmartUseKind",
    kind: "BaseKind",
    mixins: ["SmartWizardMixin"]
});

new FirstUseKind().write();
new SmartUseKind().write();