#Modal in Storybook

4 messages · Page 1 of 1 (latest)

woeful island
#

Hey everyone,
I have currently an issue with displaying the Mantine modal in Storybook. When opening the modal, only the overlay is showing. My guess is that portals are not working as the target in the html body ist missing. But when I set withinPortal to false, the modal position is shifted to the right side of the screen (see picture).

How can I make this work, is there a default portal id where I can create a target in the body manually?

tidal mica
woeful island
#

Hmm this just the modal used inside a Storybook with an additional button to trigger the modal. No scrolling. It looks like the inner modal div has a wrong position. When I am setting the left position inside the dev tools to 0 then its in the right position.

When I an using the modal together with a form for example, then I can use the modal even with portal without an issue. So its only an issue if I am using the modal alone in a story.

gritty halo
#

I had similar but suspect it's more-so a storybook issue - I found with parameters.layout as 'centered' it would behave like this, changing to 'fullscreen' or 'padded' resolved it