Skip to content

Expose snackbar timer in order to allow customization - #588

Open
delijah wants to merge 7 commits into
iamhosseindhv:masterfrom
delijah:use-snackbar-timer
Open

Expose snackbar timer in order to allow customization#588
delijah wants to merge 7 commits into
iamhosseindhv:masterfrom
delijah:use-snackbar-timer

Conversation

@delijah

@delijah delijah commented Nov 14, 2023

Copy link
Copy Markdown

This PR makes it possible to add a progress bar which indicates the timers progress (in your customized version of the snackbar). In order to achieve that, we've moved all the timer related stuff into a separate hook, which will be exposed, and we've added a config option called disableAutoHideTimer, which disables the internal timer (which enables us to use it then in the customized component). A nice side effect is, that the Snackbar component is freed of all the timer logic.

If you have any questions or considerations please reach out.

I feel like this could deserve an example or docs, but i don't know how to add it.

This is how it can be used in the customized snackbar:

Screenshot 2023-11-14 at 01 19 09

@delijah

delijah commented Nov 21, 2023

Copy link
Copy Markdown
Author

@iamhosseindhv Let me know if you need more infos/work from my side to proceed 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant