Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229735

Changing the css class of Button on Alert

$
0
0

Hi I'm really struggling to change the color of the buttons in a alert. I don't want to change the default since the alert shoud have three different color buttons. For starters I just want to change one button's color to red.

.ts file:
`let alert = this.alertCtrl.create({

  title : title,
  message : text,
  inputs: [
    {
      name: 'pin',
      placeholder: 'Pin'

    }
  ],
  buttons: [{
    cssClass: 'buttoncss',
    text: 'btnType',
  }]
});

alert.present();`

.scss file:

`let alert = this.alertCtrl.create({

  title : title,
  message : text,
  inputs: [
    {
      name: 'pin',
      placeholder: 'Pin'

    }
  ],
  buttons: [{
    cssClass: 'buttoncss',
    text: 'btnType',
  }]
});

alert.present();`

Thanks


Viewing all articles
Browse latest Browse all 229735

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>