mini-alert
v1.0.8
Published
Just a small javascript notification popup for ES6 and/or React.
Downloads
4
Maintainers
Readme
mini-alert
Just a small javascript notification popup for ES6 and/or React.
Installation
$ npm install mini-alert
Examples
import miniAlert from 'mini-alert';
import 'mini-alert/miniAlert.css';
// import 'mini-alert/miniAlert.scss'; // <!-- SCSS file (optional)
miniAlert({
text: "Simple text!!"
});
function handleAlert() {
miniAlert({
overflow: true, // <-- disable behind the alert
autoremove: true, // <-- automatic remove
time: 500, // <-- milliseconds
size: 'large', // <-- small, medium, large
cartoon: true, // <-- "cartoon effect" true/false
limit: 4, // <-- max alerts visible at the same time
text: "Hello world!!"
});
}
function App() {
return (
<div>
<button onClick={handleAlert}>Click me!!</button>
</div>
);
}
Demo
Just a example project where you can see miniAlert in action..
License
Licensed under MIT