JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
    
    <head>
        <link href="http://cdn.sencha.io/touch/sencha-touch-2.1.0/resources/css/sencha-touch.css"
        rel="stylesheet" />
        <script src="http://cdn.sencha.io/touch/sencha-touch-2.1.0/sencha-touch-all.js"></script>
        <!-- <script src="http://cdn.sencha.io/touch/sencha-touch-2.1.0/sencha-touch-all-debug.js"></script> -->
        <title>PickerIcons</title>
    </head>
    
    <body></body>

</html>

CSS

img.pickerIcon {
    height: 25px;
    width: 25px;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: auto;
}

JavaScript

Ext.application({
    name: 'PickerIcons',

    selectOptions: [{
        text: 'Diamonds',
        value: 'd',
        iconUrl: 'http://s11.postimage.org/pkvgix61b/diamonds.png'
    }, {
        text: 'Hearts',
        value: 'h',
        iconUrl: 'http://s11.postimage.org/rqprdf9hr/hearts.png'

    }, {
        text: 'Spades',
        value: 's',
        iconUrl: 'http://s11.postimage.org/oxwjte95b/spades.png'
    }, {
        text: 'Clubs',
        value: 'c',
        iconUrl: 'http://s11.postimage.org/86b8an8wf/clubs.png'
    }, {
        // Dummy value for bug in Chrome, because last item can't be selected
        text: '',
        value: '_dummy',
        iconUrl: ''
    }],

    getIconUrl: function (optValue) {
        for (var i = 0; i < this.selectOptions.length; i++) {
            var opt = this.selectOptions[i];
            if (opt.value === optValue) {
                return opt.iconUrl;
            }
        }
        return '';
    },

    prependIconToSelectfield: function (optValue, domElement) {
        var height = Math.floor(domElement.offsetHeight * 0.5);
        var iconUrl = this.getIconUrl(optValue);
        domElement.style.backgroundImage = 'url(' + iconUrl + ')';
        domElement.style.backgroundSize = height + 'px';
        domElement.style.backgroundRepeat = 'no-repeat';
        domElement.style.backgroundPosition = 'left center';
        domElement.style.paddingLeft = '30px';
    },

    launch: function () {
        Ext.create('Ext.form.Panel', {
            fullscreen: true,
            items: [{
                xtype: 'selectfield',
                label: 'Choose a color',
                itemId: 'IconSelect',
                id: 'MyIconSelect',
                usePicker: true,
                options: PickerIcons.app.selectOptions,

                listeners: {
                    change: function () {
                        var pickerDOM = document.querySelector('#' + this.getId() + ' input[name="picker"]');
                 ...