Open adrianmak opened 6 years ago
Hi, I am also having the same issue.
swal({ title: 'Recover Item', text: 'Would you like to recover the selected items?', buttons: { confirm: { text: "Yes", value: true, visible: true, className: "bg-warning", closeModal: true, }, cancel: { text: "Cancel", value: true, visible: true, className: "bg-default", closeModal: true, } } }, function () { ... });
className failed to take more than one classes.
Failed to execute 'add' on 'DOMTokenList': The token provided ('btn btn-success') contains HTML space characters
`const swalWithBootstrapButtons = Swal.mixin({ customClass: { confirmButton: 'btn btn-success', cancelButton: 'btn btn-danger' }, buttonsStyling: false })
swalWithBootstrapButtons.fire({ title: 'Are you sure?', text: "You won't be able to revert this!", icon: 'warning', showCancelButton: true, confirmButtonText: 'Yes, delete it!', cancelButtonText: 'No, cancel!', reverseButtons: true }).then((result) => { if (result.isConfirmed) { swalWithBootstrapButtons.fire( 'Deleted!', 'Your file has been deleted.', 'success' ) } else if ( / Read more about handling dismissals below / result.dismiss === Swal.DismissReason.cancel ) { swalWithBootstrapButtons.fire( 'Cancelled', 'Your imaginary file is safe :)', 'error' ) } })`
Add class in customClass
I tried to add bootstrap button class on the button. But it didn't work Checked the html output source, my custom class names are not added