/component-modal-check-list

Modal message with check list.

Primary LanguageCSSOtherNOASSERTION

Modal component

build status npm version dependencies status devDependencies status Gitter

Modal check list is a component to build user interface, an instance of Component module.

Installation

npm install mag-component-modal-check-list

Usage

Add component to the scope:

var ModalCheckList = require('mag-component-modal-check-list');

Create instance with custom config:

var modalCheckList = new ModalCheckList({
    title: 'sort',
    events: {
        hide: function () {
            page.panelSet.focus();
        }
    },
    labelIcon: 'theme-icon-filter',
    list: {
        size: 2,
        data: [
            {state: true, title: 'All content', value: 1},
            {state: false, title: 'Music', value: 2},
            {state: false, title: 'Video', value: 3}
        ]
    }
});

page.add(modalCheckList);

leftPanel.add(leftPanelList = new LayoutList({
    size: 6,
    data: [
        {
            items: page.modalCheckList.getListItem(),
            click: function () {
                panelSet.blur();
                modalCheckList.show();
            }
        }
    ]
}));

Development mode

There is a global var DEVELOP which activates additional consistency checks and protection logic not available in release mode.

Contribution

If you have any problems or suggestions please open an issue according to the contribution rules.

License

mag-component-modal-check-list is released under the MIT License.