sweetalert 1 docs code example
Example 1: how to use sweetalert
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
Example 2: swal change confirm button class
Swal.fire({
title: 'example text',
buttonsStyling: false,
customClass: {
confirmButton: 'example-class' //insert class here
}
})
Example 3: change icon in sweet alert
swal({ icon: "error",});
Example 4: sweetalert 2 documentation
Swal.fire({
title: 'Error!',
text: 'Do you want to continue',
icon: 'error',
confirmButtonText: 'Cool'
})