fix(toast): inherit color in cancel button for a toast with color (#20299)

fixes #20139
This commit is contained in:
Brandy Carney
2020-01-27 11:16:23 -05:00
committed by GitHub
parent 915f7f488b
commit 7b44ae2a40
2 changed files with 9 additions and 1 deletions

View File

@@ -63,10 +63,14 @@
Translucent Toast
</ion-button>
<ion-button expand="block" id="color-toast" onclick="openToast({message: 'click to close', buttons: ['Close'], color: 'danger'})">
<ion-button expand="block" id="color-toast" onclick="openToast({message: 'click to close', buttons: [{text: 'Close'}, {icon: 'close', role: 'cancel'}], color: 'danger'})">
Color Toast
</ion-button>
<ion-button expand="block" id="light-color-toast" onclick="openToast({message: 'click to close', buttons: [{text: 'Close'}, {icon: 'close', role: 'cancel'}], color: 'light'})">
Light Color Toast
</ion-button>
<ion-button expand="block" id="custom-class-toast" onclick="openToast({message: 'click to close', buttons: ['Close'], cssClass: 'my-custom-class'})">
Custom Class
</ion-button>

View File

@@ -65,6 +65,10 @@
color: #{current-color(contrast)};
}
:host(.ion-color) .toast-button-cancel {
color: inherit;
}
:host(.ion-color) .toast-wrapper {
background: #{current-color(base)};
}