cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.62k stars 71 forks source link

fix(dialog): add scrollbar for body if needed #119

Open BigDog1400 opened 9 months ago

BigDog1400 commented 9 months ago

Hi, I'm using the Dialog component as a "Modal" component (similar to this one from Chakra-UI: https://chakra-ui.com/docs/components/modal), but when the content of the body in the Dialog surpasses the available window height, it doesn't add a scroll bar to the body. I'm wondering if this is something that's being missed from the Dialog component, or there should be an exclusive <Modal/> component that handles this.

cschroeter commented 9 months ago

@BigDog1400

Good catch. I will come up with sth

idapartners commented 1 week ago

Related — it seems that this is at least partially fixed, in that if the Dialog Content exceeds the window height, a scrollbar is added; however, the content is truncated at the top.

Specifically, it appears the align-items: center setting on data-part="positioner" is causing the issue when content is longer than screen height on at least Chrome and Safari.