react-mini-alert-confirm
v1.1.8
Published
Simple and easy configurable alert/confirm dialog box for React.
Downloads
19
Maintainers
Readme
react-mini-alert-confirm
Simple and easy configurable alert/confirm dialog box for React.
Installation
$ npm i react-mini-alert-confirm
Examples
import ReactMiniAlertConfirm from 'react-mini-alert-confirm';
// import 'react-mini-alert-confirm/build/index.css'; // <!-- CSS file (optional, if you want to customize the dialog box)
// import 'react-mini-alert-confirm/build/index.scss'; // <!-- SCSS file (optional)
if("if-your-condition-is-true-shows-the-dialog-box") {
<ReactMiniAlertConfirm />
}
<ReactMiniAlertConfirm
show={true} {/* <-- optional, true/false */''}
text="I'm a text" {/* <-- optional, text of the alert/confirm */''}
ico="error" {/* <-- optional, ok/error */''}
callback={ {/* <-- optional, if available it is a confirm dialog box */''}
() => console.log("I'm a confirm dialog box")
}
/>
Demo
Just a example project where you can see react-mini-alert-confirm in action..
License
Licensed under MIT