react-mini-alert-confirm

1.1.8 • Public • Published

react-mini-alert-confirm

NPM version

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

react-mini-alert-confirm

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

Package Sidebar

Install

npm i react-mini-alert-confirm

Weekly Downloads

14

Version

1.1.8

License

MIT

Unpacked Size

21.6 kB

Total Files

9

Last publish

Collaborators

  • orsifrancesco