I want to change the position of an icon in SweetAlert2 to line up horizontally with a piece of text. (I think I should use display: flex, but as far as I know there is no way to put the icon class inside a div next to the text class).
This is how the alert looks at the moment:
And this is how I want it to look:
Here is the code of my alert:
Swal.fire({
html: '<span class="text">Congratulations</span>',
icon: 'success',
showConfirmButton: false,
position: 'bottom-end',
customClass: {
popup: 'swal-wide',
icon: 'icon-class'
}
})
And here is my CSS file (it currently has nothing important at all):
.icon-class{
font-size: 10px;
}
.text{
font-size: 15px;
}
@media screen and (min-width: 761px){
.swal-wide{
width: 23% !important;
}
}
@media screen and (max-width: 760px){
.swal-wide{
width: 100% !important;
}
}

