hot-toast icon indicating copy to clipboard operation
hot-toast copied to clipboard

Feature Request: Add default action and callback...

Open bvkimball opened this issue 4 years ago • 4 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Expected behavior

This library is great but like most other toast libraries I find them lacking an action button and callback, which i think is a common requirement when using a toast or snackbar, unless i missed it. I know this could be implemented by using a custom template, but i think it should be part of the default behaior.

For example: image

Just My Opinion

bvkimball avatar Feb 01 '21 22:02 bvkimball

@NetanelBasal thoughts?

Action button can be added, but I think all users will end up writing their custom styles for button, so that it looks like their app's style guide.

In such cases, templates are the right way.

shhdharmen avatar Feb 02 '21 01:02 shhdharmen

@bvkimball Are you talking about the snackbar variation?

NetanelBasal avatar Feb 02 '21 05:02 NetanelBasal

@NetanelBasal I was talking about both variation. I see it more common in SnackBars (ie material), In my apps we have Growls, Toasts, Banners & Snackbars and always need to add a default action ( Not for all toasts but some )

@shhdharmen I agree and disagree, I think the SnackBar is becoming a common paradigm that a lot of UI systems are adopting both as a pattern and stylistically (if thats a word), because it is easily recognizable concept to the user. Less so for regular toast.

The request was just Food for Thought.

bvkimball avatar Feb 02 '21 15:02 bvkimball

In the toast variation, it doesn't make a lot of sense to me. In the snackbar variation, it could be an option. Let's keep it open and see the demand for this feature.

NetanelBasal avatar Feb 03 '21 06:02 NetanelBasal