We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6310565 commit 510352eCopy full SHA for 510352e
README.md
@@ -140,7 +140,7 @@ If `gravity` is equals to `bottom`, it will be pushed from bottom.
140
| close | boolean | To show the close icon or not | false |
141
| gravity | "top" or "bottom" | To show the toast from top or bottom | "top" |
142
| position | "left" or "right" | To show the toast on left or right | "right" |
143
-| backgroundColor | CSS background value | Sets the background color of the toast. To be deprecated, use `style.backgroundColor` option instead | |
+| backgroundColor | CSS background value | To be deprecated, use `style.background` option instead. Sets the background color of the toast | |
144
| avatar | URL string | Image/icon to be shown before text | |
145
| className | string | Ability to provide custom class name for further customization | |
146
| stopOnFocus | boolean | To stop timer when hovered over the toast (Only if duration is set) | true |
src/toastify-es.js
@@ -196,8 +196,9 @@ class Toastify {
196
197
if (this.options.backgroundColor) {
198
// This is being deprecated in favor of using the style HTML DOM property
199
- console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.backgroundColor" property.');
200
- divElement.style.background = this.options.backgroundColor;
+ // We'll go ahead and just add the `backgroundColor` to the `style` object to simulate correct settings moving forward
+ console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
201
+ this.options.style.background = this.options.backgroundColor;
202
}
203
204
// Loop through our style object and apply styles to divElement
src/toastify.js
@@ -94,9 +94,10 @@
94
divElement.className += " " + this.options.gravity;
95
96
97
- //This is being deprecated in favor of using the style HTML DOM property
98
99
+ // This is being deprecated in favor of using the style HTML DOM property
100
101
102
103
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments