Skip to content
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

add toast component #52

Merged
merged 1 commit into from
May 27, 2024
Merged

add toast component #52

merged 1 commit into from
May 27, 2024

Conversation

futurepaul
Copy link
Contributor

we can use this for global errors (#46) and anything else where we want to notify the user outside of their immediate context.

closes #39

Screen.Recording.2024-05-17.at.9.47.58.AM.mov

@futurepaul futurepaul requested review from benthecarman and TonyGiorgio and removed request for benthecarman May 17, 2024 16:51
src/components/toast.rs Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
Copy link
Contributor

@TonyGiorgio TonyGiorgio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs rebase

@futurepaul
Copy link
Contributor Author

I can't figure out how to rebase this. I think it might be something to do with how I changed the lifetimes of the icon component. Tbh I really don't know what lifetimes mean in all this stuff.

there is where I'm stuck

mismatched types
       expected enum `Message` (`Message`)
found type parameter `Message` (type parameter `Message`)
toast.rs(59, 10): found this type parameter
toast.rs(107, 38): arguments to this method are incorrect
toast.rs(107, 25): the return type of this call is `Message` due to the type of the argument passed
button.rs(107, 12): method defined here
on_close: impl Fn(usize) -> Message + 'a

@futurepaul futurepaul merged commit 60eb6be into master May 27, 2024
2 checks passed
@futurepaul futurepaul deleted the toast branch May 27, 2024 14:38
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.

Show toast on copy to clipboard event
2 participants