How to use the pnotify.desktop 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 bluecolor / octopus / frontend / src / lib / notify.js View on Github external
import PNotify from 'pnotify'
import 'pnotify/dist/pnotify.desktop'

PNotify.prototype.options.styling = 'fontawesome'
PNotify.desktop.permission()

const success = (message) => {
  new PNotify({ // eslint-disable-line no-new
    title: 'Success',
    type: 'success',
    text: message
  })
}

const error = (message) => {
  new PNotify({ // eslint-disable-line no-new
    title: 'Error',
    type: 'error',
    text: message
  })
}