react-swal

React wrapper for SweetAlert

Usage no npm install needed!

<script type="module">
  import reactSwal from 'https://cdn.skypack.dev/react-swal';
</script>

README

react-swal

A React wrapper for SweetAlert

Installation

npm install --save react-swal

Usage

const SweetAlert = require('react-swal');

<SweetAlert isOpen={true}
            type="warning"
            confirmButtonText="Yup"
            cancelButtonText="Nope"
            callback={this.callback} />

Properties

react-swal supports all configuration properties supported by SweetAlert. For more info, see the "Configuration" section of the SweetAlert docs.

License

MIT License.