mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(toast): inherit color in cancel button for a toast with color (#20299)
fixes #20139
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user