Closed bergstromdev closed 7 months ago
Thanks for raising this issue, I'll look into it as soon as I get the chance.
Hey there, you'd need to pass #main
in this case as the portal prop to get your desired results. I was able to confirm it's working making that modification to your repro!
https://stackblitz.com/edit/vaul-svelte-scaled-d5zwtf?file=src%2Froutes%2F%2Bpage.svelte
I don't think that's it. If you look at the portal in the screenshot it's still rendered on the body.
There also a console warning
<Root> was created with unknown prop 'portal'
Oh I see now, you are correct. I'll look into this further!
Describe the bug
Thanks for a great lib!
I'm trying to render the dialog on the main tag instead of the body.
<main id="main
> ... I've tried to pass 'main' to the portal prop but it doesn't do anything, it always renders on the body. I also tried to pass the element but same issue there.To be able to use my theme colors in the dialog it needs to be rendered inside my theme wrapper which is inside the body in my setup.
Reproduction
https://stackblitz.com/edit/vaul-svelte-scaled-sj4vif?file=src%2Froutes%2F%2Bpage.svelte
Logs
No response
System Info
Severity
annoyance