How do I make the button centered
you can ctrl+f for .swal-footer in the dist/sweetalert.min.js and update the style it's dumping for text-align:right to center. I think this should be committed to the project as the buttons look pretty off to the right.
Thanks for the tip. Works well! I agree that multiple buttons look better when centered. Hopefully someone could add "align" property for button object?
No need to change the repo's source code. You can simply add the following CSS to your page:
swal-footer {
text-align: center;
}
You can find more styling options here.
Thanks for the link to the themes; should have looked there first!
Just to clarify, the change should be:
.swal-footer {
text-align: center;
}
Works perfectly.
Most helpful comment
No need to change the repo's source code. You can simply add the following CSS to your page:
You can find more styling options here.