cssClass style the Button in ActionSheet in Ionic 2

Is it possible to style the button and center the text in an Actionsheet? I have tried everything but didn’t figure out ow to style it… any help?

My code looks like this:

let actionSheet = this.actionSheetCtrl.create({
         cssClass: 'action-sheets-basic-page',
         buttons: [
           {
             text: 'Archive',
             cssClass:'yellow-color',
           }
         ],
         
       })
       actionSheet.present();

My css would look like this:

.action-sheets-basic-page{

.yellow-color{
height: 40vh;
left:37%;
}
}

Your CSS is scoped wrong. .yelllow-color does not need to be nested within .action-sheets-basic-page

1 Like