HarborWallet / harbor

Ecash management tool
https://harbor.cash
MIT License
133 stars 17 forks source link

add toast component #52

Closed futurepaul closed 5 months ago

futurepaul commented 6 months ago

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

https://github.com/MutinyWallet/harbor/assets/543668/6628bf45-30bf-4c65-a6fb-55b626ba6e1b

futurepaul commented 6 months ago

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