-
-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced Configuration for toast.promise States #464
Comments
It's looking like this would be the place to implement the thing Lines 107 to 165 in 2b99cd8
|
I've been struggling with the same thing here. I would love to have the same action buttons in my promise messages, but it lacks a lot of flexibility. |
Just found this: |
Actually I was aware of that. I think implementing description and buttons for promised toasts is a better approach since it also make the developers use the same structure for showing a toast regardless of it is promised or not. |
Agreed, the whole point should be to reduce code and take it out of our components |
I was just trying to figure this out myself. Just showing the label: 'Loading...' is not sufficient at times. Is there a better way to achieve this? |
Feature Request: Enhanced Configuration for toast.promise States
Problem Statement:
Currently,
toast.promise
supports basic customization of messages for different states (loading, success, error), but lacks support for detailed configurations like different actions and descriptions for each state. If a user tries to add a custom component to implement description and buttons, they lose the consistent styling provided by the library(also code becomes cumbersome).Using data and error parameters to show a toast description, supplying an action based on the result of the promise would be really elegant. You can make user go to the output's page on success while open logs on error.
Note: Please let me know if there is an easy way of doing that but I'm missing.
Example Usage:
The text was updated successfully, but these errors were encountered: