How to use the pnotify/dist/umd/PNotify.default function in pnotify

To help you get started, we’ve selected a few pnotify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sciactive / pnotify / libtests / browserify / src / index.js View on Github external
// Not working? Did you `npm install` first?
var PNotify = require('pnotify/dist/umd/PNotify').default;

document.getElementById('button1').addEventListener('click', function () {
  PNotify.notice({
    title: 'Yay!',
    text: 'It works!'
  });
});

document.getElementById('button2').addEventListener('click', function () {
  require('pnotify/dist/umd/PNotifyConfirm');

  PNotify.notice({
    title: 'Yay!',
    text: 'It works!',
    modules: {
      Confirm: {