Skip to content

Add an onPress to BaseToast #86

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

Closed
caleb-harrelson opened this issue Nov 21, 2020 · 3 comments · Fixed by #106
Closed

Add an onPress to BaseToast #86

caleb-harrelson opened this issue Nov 21, 2020 · 3 comments · Fixed by #106
Labels
enhancement New feature or request

Comments

@caleb-harrelson
Copy link

As far as I can tell, there isn't a way to keep the default toast formatting and also add an onPress to the toast while still keeping the ability to dismiss it.

My use case is for duplicating the behavior of notifications that deep link within the app when clicked. When the app is active I'm using toasts to show the notifications and want the user to be able to either navigate to that part of the app by clicking the toast, or dismiss it as normal and stay where they are.

@calintamas calintamas added the enhancement New feature or request label Nov 21, 2020
@caleb-harrelson
Copy link
Author

caleb-harrelson commented Dec 1, 2020

I forked the repo and made a couple small changes... 😳

I encourage you to check out the documentation to see how the API has changed.

The first commit was mostly a straight typescript conversion, which you might find useful. You are of course welcome to backport anything else you'd like as well, but you won't want the whole fork as a PR as it is very opinionated toward my company's code style and infrastructure.

@calintamas calintamas mentioned this issue Dec 6, 2020
@calintamas
Copy link
Owner

@caleb-harrelson nice! I added the onPress as well, with a slightly different api

@caleb-harrelson
Copy link
Author

I like it. Looks like you solved the collisions with swipe to dismiss too, awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants