Sencha ActionSheet examples

The Sencha website has a few good examples of how to use an ActionSheet, including this basic one:

Ext.application({
    launch: function () {
        var actionSheet = Ext.create('Ext.ActionSheet', {
            items: [{
                text: 'Delete draft',
                ui: 'decline'
            }, {
                text: 'Save draft'
            }, {
                text: 'Cancel',
                ui: 'confirm'
            }]
        });

        Ext.Viewport.add(actionSheet);
        actionSheet.show();
    }
});

That example comes from this URL:

Configuration definition

Defined with a configuration approach, that code would look more like this:

Ext.define('Radio.view.TestSheet', {
    extend: ''Ext.ActionSheet',
    alias: 'widget.testSheet',

    items: [
    {
        text: 'Delete draft',
        ui: 'decline'
    },
    {
        text: 'Save draft'
    },
    {
        text: 'Cancel',
        ui: 'confirm'
    }]
});

I didn’t try to compile/run that code, but it looks okay.

More examples (handlers, titlebar)

Other Sencha ActionSheet examples are at these URLs: