Just add any name you want in cssClass of alert as i named alertCustomCss
logOut() {
this.alrtCtrl.create({
title: "Log out ?",
message: "Are you sure to logout?",
buttons: [
{
text: "Cancel",
role: 'cancel',
handler: () => {
//something to do
}
},
{
text: "Confirm",
handler: () => {
//log Out
}
}
],
cssClass: 'alertCustomCss'
}).present();
Adding Styles to alertCustomCss class
.alertCustomCss{
background-color: red;
color: white;
button{
color: green!important;
}
.alert-wrapper{
background: yellow;
}
.alert-message {
color: skyblue;
}
.alert-title{
color: black;
}
}
View Image after applying above style => Image Link