JSFiddle - React, Tailwind, and code Playground
by Walter Rumsby
HTML
<link rel="stylesheet" href="http://cdn.sencha.io/ext/gpl/4.2.0/resources/css/ext-all-neptune.css">
JavaScript
Ext.widget({
xtype: 'panel',
renderTo: Ext.getBody(),
layout: 'hbox',
items: [{
xtype: 'button',
text: 'Colour',
menu: {
items: [{
text: 'Red'
}, {
text: 'Green'
}, {
text: 'Blue'
}],
listeners: {
click: function (menu, item, e, eOpts) {
var panel = this.up('panel'),
box = panel.down('#output');
box.update(item.text);
}
}
}
}, {
itemId: 'output',
xtype: 'box'
}]
});