xxxxxxxxxx
swal("Good job!", "You clicked the button!", "success");
xxxxxxxxxx
<SweetAlert
warning
showCancel
confirmBtnText="Yes, delete it!"
confirmBtnBsStyle="danger"
title="Are you sure?"
onConfirm={this.deleteFile}
onCancel={this.onCancel}
focusCancelBtn
You will not be able to recover this imaginary file!
</SweetAlert>
xxxxxxxxxx
swal({
title: "Are you sure?",
text: "Once deleted, you will not be able to recover this imaginary file!",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
swal("Poof! Your imaginary file has been deleted!", {
icon: "success",
});
} else {
swal("Your imaginary file is safe!");
}
});