ionic-team / ionic-team/ionic-framework

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

オープン
#21,818 コメント 2 件 リアクション 5 件 担当者 0 名 GitHub で見る
package: core type: bug
主要言語
TypeScript
スター
52.7k
フォーク
13.3k
平均マージ
1日 15時間
マージ済み PR(30日)
51

説明

# 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;
}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。