JSFiddle - React, Tailwind, and code Playground

by ric47121

HTML

<link rel="stylesheet" href="http://extjs.cachefly.net/ext-4.0.2a/resources/css/ext-all.css" type="text/css" media="screen" title="no title" charset="utf-8">

<style>
    .back{  
        background: url(http://www.quizzpot.com/demos/extjs/panels/icons/arrow_left.png) center 0px no-repeat !important;  
    }  
</style>

JavaScript

var store = Ext.create('Ext.data.TreeStore', {
    root: {
        expanded: true,
        children: [
            { text: "detention", leaf: true  },
            { text: "homework", expanded: true, children: [
                { text: "book report", leaf: true, iconCls:'back' },
                { text: "alegrbra", leaf: true}
            ] },
            { text: "buy lottery tickets", leaf: true }
        ]
    }
});

Ext.create('Ext.tree.Panel', {
    title: 'Simple Tree',
    width: 200,
    height: 150,
    store: store,
    rootVisible: false,
    renderTo: Ext.getBody()
});