-
Is it possible to apply an inline style to the progress bar? I'd like to have a specific color for each toast. I can update the color globally: (document.querySelector(":root") as HTMLElement).style.setProperty(
"--toastify-color-progress-light",
value
); but the issue is that it will update the color on all the displayed toasts, which is not what I want. There are a vast number of possible colors, so creating a class for every color is not a viable solution :/ Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
HynekS
Jun 14, 2023
Replies: 1 comment
-
Never mind. It's in the docs, I just overlooked: toast(`Hello world!`, {
progressStyle: { background: "red"},
}); Note: since the default class is targeting "background" property, updating style of "backgroundColor" won't work. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fkhadra
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never mind. It's in the docs, I just overlooked:
Note: since the default class is targeting "background" property, updating style of "backgroundColor" won't work.