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

Request: :top_center and :bottom_center #2

Open
sodapopcan opened this issue May 18, 2024 · 5 comments
Open

Request: :top_center and :bottom_center #2

sodapopcan opened this issue May 18, 2024 · 5 comments

Comments

@sodapopcan
Copy link

My current toasts show up in the bottom centre. Obviously this isn't super desirable if you have multiple toasts, though my project doesn't need them (I'm more after the auto-hiding).

@srcrip
Copy link
Owner

srcrip commented May 20, 2024

Will do! Sonner has this option and I would like to have it as well.

@sergchernata
Copy link

@srcrip do you need a PR for this or are you already working on it?

@srcrip
Copy link
Owner

srcrip commented Jul 6, 2024

Hi @sergchernata,

I can knock it out quickly, but I'm working on a few higher priority issues that are more complex first so if you would like to make a PR it will be appreciated too!

@sergchernata
Copy link

I ended up just wrapping the LiveToast component into a div and positioning that in the center.

<div class="absolute bottom-0 left-1/2 -translate-x-1/2">
  <LiveToast.toast_group flash={@flash} connected={assigns[:socket] != nil} toast_class_fn={&Front.Helpers.toast_class_fn/1} />
</div>

@srcrip
Copy link
Owner

srcrip commented Sep 11, 2024

No worries, I will still make the change requested I've just been caught up with a few other things + thinking about one big change to the lib itself thats taking up my time.

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

No branches or pull requests

3 participants