1.0.6 • Published 3 years ago

mini-alert-confirm v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

mini-alert-confirm

NPM version

Simple and easy configurable alert/confirm dialog box for Javascript.

mini-alert-confirm

Installation

$ npm i mini-alert-confirm

Import

add the following code on your index.js

import miniAlertConfirm from 'mini-alert-confirm';
// import 'mini-alert-confirm/index.css'; // (optional css, if you want to customize the dialog box)

alert = function (text) { miniAlertConfirm(text); }
confirm = function (text, callback) { miniAlertConfirm(text, callback); }

Examples

after importing the library you can just call alert and confirm where/when you want

alert("I'm a beautiful alert popup!!");
confirm("Do you like this popup?", () => {
    console.log("I'm a callback if you press OK button");
})

Demo

Just a example project where you can see mini-alert-confirm in action..

License

Licensed under MIT

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago