Toast should be able to have status's, or assign a class name to it using the addToast method #1308
Closed
micahjones13
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use Case
I need to generate error/success toasts based on API calls. If the api fails, make an error toast. If it passes, make a success one.
According to the figma documentation (toast page), toasts can use the notification banner status colors.
Proposed Feature
I propose that a rux-toast gain a new prop for status, similar to rux-notification. This status would then set the border color and the close ("X") icon color. This way, each time you create a toast using toast-stacks addToast method, you can pass it a status prop as well as a message prop.
Alternatively, you could have a class prop added instead (or in addition to). This would allow for styling to be more dynamic because each toast could have it's own class. I think both may be the way to go here.
Beta Was this translation helpful? Give feedback.
All reactions