How to use the pnotify/dist/es/PNotifyCompat 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 ArcadeData / arcadeanalytics / src / main / webapp / app / shared / services / notification.service.ts View on Github external
}
        if (title) {
            options['title'] = title;
        }
        options['text'] = text;

        if (timeout) {
            options['delay'] = timeout;
        }

        if (icon) {
            options['icon'] = icon;
        }

        // notification showing
        const notification = new PNotify(options);

        // console logging
        if (type === 'error') {
            console.error(title + ': ' + text);
        } else {
            console.log(title + ': ' + text);
        }

        return notification;
    }