Is there a chance to be able to add class to confirm / cancel buttons? also disable inline styles.
Something like this:
confirmButtonText: 'OK',
confirmButtonColor: '#8CD4F5',
confirmButtonClass: ' ',
cancelButtonText: 'Cancel',
cancelButtonColor: '#D0D0D0',
cancelButtonClass: ' ',
unstyleButtons: false,
Thanks!
+1, specially for removing inline styling (should use classes)
+1
Pleeeeeeasse remove the inline styles!! I think it's a major issue. Everybody needs to restyle sweetalert who is using it seriously.
I'm using sass & bootstrap, so I would only need something like this:
.sweet-alert button.confirm {
@extend .btn-primary;
}
.sweet-alert button.cancel {
@extend .btn-default;
}
instead of copying pages of css code from bootstrap and setting !important everywhere (which is an easy-to-avoid anti-pattern) to do the same.
+1
+1
Shame this is ignored, it's a deal breaker, I cannot use this - editing styles on two places is bad idea, not to even mention inline styles.
+1
BTW, using confirmButtonColor: '' it removes the inline stuff ;)
Inline styles have been removed in SweetAlert 2.0. You can also add you own classes using the new button options. For more info, check out the upgrade guide
Most helpful comment
+1
BTW, using
confirmButtonColor: ''it removes the inline stuff ;)