- npm install --save sweetalert2 sweetalert2-react-content
import Swal from "sweetalert2";
- Swal.fire({
- title: 'Success',
- type: 'success',
- text: 'Your work has been saved.',
- });
- Swal.fire({
- title: 'Are you sure?',
- text: 'User will have Admin Privileges',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- cancelButtonColor: '#d33',
- confirmButtonText: 'Yes!'
- });
- Swal.fire({
- icon: 'error',
- title: 'Oops...',
- text: 'Something went wrong!',
- footer: '<a href>Why do I have this issue?</a>'
- });
- Swal.fire({
- position: 'top-end',
- icon: 'success',
- title: 'Your work has been saved',
- showConfirmButton: false,
- timer: 1500
- });
No comments:
Post a Comment