0

I added a custom style in my variables.scss to change my alert but I'm not sure how I can apply this. I already saw this question but it did not help me. Do I have to put this in my typescript? If yes, how?

my variabless.scss

.alert-wrapper {
  border-radius: 13px;
  overflow: hidden;
  max-width: 270px;
  background-color: #f8f8f8;
  -webkit-box-shadow: none;
  box-shadow: none;
}

my html calling the alert

<button ion-button color="babydanger" (click)="showCheckbox()">SIGN UP</button>

my .ts

showCheckbox() {
    let alert = this.alertCtrl.create();
    alert.setTitle('Which planets have you visited?');

    alert.addInput({
      type: 'checkbox',
      label: 'Alderaan',
      value: 'value1',
      checked: true
    });

    alert.addInput({
      type: 'checkbox',
      label: 'Bespin',
      value: 'value2'
    });
3
  • so do you want the custom style to override all of your alerts or only some in some pages? can you share more of context what you want to achieve Commented Aug 20, 2018 at 20:37
  • @SergeyRudenko yes. all alerts Commented Aug 21, 2018 at 17:06
  • so depending on what you need to change you may want to check this resource and potentially just override the values for scss vars: ionicframework.com/docs/theming/overriding-ionic-variables Commented Aug 21, 2018 at 19:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.