srcrip / live_toast

A beautiful drop-in replacement for the Phoenix Flash system.
https://toast.src.rip
MIT License
193 stars 17 forks source link

feat: add hability to customize group toast classes #8

Closed nelsonmestevao closed 4 months ago

nelsonmestevao commented 5 months ago

In my use case the need is related with the outside padding but I think it can be useful in other situations. This allows more freedom.

I am happy to improve anything that might not be following some expectation that I did not antecipate.

sergchernata commented 5 months ago

We need this right now, as well. In our case it's because we need to position the toast container as absolute, not fixed.

srcrip commented 5 months ago

Thank you! I will get this merged ASAP. I just want to give it a good review. Sorry I didn't see it earlier, my GH notifications just failed me.

curtisault commented 4 months ago

We need this right now, as well. In our case it's because we need to position the toast container as absolute, not fixed.

Can you not resolve this in the immediate by wrapping the component in the root app.html.heex with a span or div using class="absolute"?

image
srcrip commented 4 months ago

Thank you very much for your pr @nelsonmestevao. I ended up wanting to tweak things a little bit more, so I added the changes in https://github.com/srcrip/live_toast/commit/f1d86a17838c5a33788e49e543e8c31448096a7d. I hope you're not too disappointed if you wanted the contributor badge. If you make another improvement I'd be happy to merge it.

Let me know if that resolves what you need to do and we can close this, or if you need to add something else we can tweak this branch and merge it.

srcrip commented 4 months ago

Note that I have not released it yet so you'd have to point at master to try it out. It'd be great if you let me know if it works before I release it, but I may release it before then if I get too eager 😂

nelsonmestevao commented 4 months ago

Hey @srcrip, no worries :P

Thank you for improving this part. I will test and let you know soon :pray:

nelsonmestevao commented 4 months ago

Hey @srcrip, it works perfectly for my use case. Thank you very much :bow: