Modal is a component to build user interface, an instance of Component module.
npm install mag-component-modalAdd component to the scope:
var Modal = require('mag-component-modal');Create instance with custom config:
page.modal = new Modal({
title: 'My Title',
icon: 'star',
children: [new Button({value: 'Create'})]
});Add component to the page and show it:
page.add(page.modal);
page.modal.show();There is a global var
DEVELOPwhich activates additional consistency checks and protection logic not available in release mode.
If you have any problems or suggestions please open an issue according to the contribution rules.
mag-component-modal is released under the MIT License.