nice-dialogs

0.3.0 • Public • Published

nice-dialogs

Awesome replace for alert, confirm & prompt js commands.

This is built with Electron usage in mind, but should flawlessy work on any modern browser that support the dialog element. The module is tested only on Electron. Open an issue if you find bugs on some other browser engine.

Templates use CSS classes from Photon. However, Photon css file are not included, so you can style it whatever you whant.

We provide only the commonjs module. If you want to use it in a browser, you can use browserify to bundle it with your code. Be sure to include brfs transform, because assets are read using fs.readFileSync and you want to include their content in your bundle.

Travis Build Status NPM module NPM downloads

alert confirm

Example of dialogs when styled using Photon

Installation

npm install --save nice-dialogs

Usage

  const dialogs = require('nice-dialogs');
  dialogs.confirm('Are you sure?', 'title')
    .then(result => console.log(result))  // true/false
 
  dialogs.alert('Something happened!', 'Title')
    .then(result => console.log(result))  // always true

License

MIT License.

Copyright (c) 2015 Andrea Parodi

Readme

Keywords

none

Package Sidebar

Install

npm i nice-dialogs

Weekly Downloads

2

Version

0.3.0

License

MIT

Last publish

Collaborators

  • parroit