Modal package for Meteor.
$ meteor add pmteor:modal
<template name="exampleModal"></template>
<template name="exampleConfirmModal">
{{# if progress.get }}
Loading...
{{/if}}
<button class="js-confirm">Confirm</button>
<button class="js-close">Close</button>
</template>
Template.example.events({
'click .modal': Modal.open('example'),
'click .confirm': Modal.confirm('exampleConfirm', () => {
Modal.close(); // last modal close.
})
});
Modal.closeAll() // All opened modal closed.
Modal.close(); // Last modal close.