ionic-team / ionic-team/ionic-framework

bug: --button-color does not modify cancel button color in toasts

Abierto
#21,818 2 comentarios 5 reacciones 0 asignados Ver en GitHub
package: core type: bug
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

# Bug Report

**Ionic version:**

[ ] **4.x**
[x] **5.x**

**Current behavior:**

Toast [custom css property](https://ionicframework.com/docs/api/toast#css-custom-properties) `--button-color` does not affect cancel button.

**Expected behavior:**

Affecting a color through `--button-color` should modify the color of all buttons present in the toast

**Steps to reproduce:**

1. start a template
2. add a toast
3. add a `--button-color` property in app.scss

**Related code:**

app.component.ts

```ts
const toast = await this.toastCtrl.create({
header: 'Toast header',
message: 'Click to Close',
position: 'top',
buttons: [
{
side: 'start',
icon: 'star',
text: 'Favorite',
handler: () => {
console.log('Favorite clicked');
}
}, {
text: 'Done',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
}
]
});
toast.present();
```

app.scss

```scss
ion-toast {
--background: red;
--button-color: red;
}
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.