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

Fixed body when modal is open should be optional #347

Open
amendezm opened this issue May 9, 2024 · 1 comment
Open

Fixed body when modal is open should be optional #347

amendezm opened this issue May 9, 2024 · 1 comment

Comments

@amendezm
Copy link

amendezm commented May 9, 2024

image

Description:

Currently, when the modal is opened in Vault, the body position is set to fixed, which may not always be desirable for all use cases. It would be beneficial to have an option to prevent this behavior by passing a prop or setting a configuration option.

Expected Behavior:

I expect that there should be an option available to prevent the body position from becoming fixed when the modal is opened. This could be achieved by adding a prop such as preventFixedBody={true} that can be passed to the modal component.

Additional Context:

This feature would provide more flexibility for users who want to customize the behavior of the modal without affecting the body position. It would be especially useful in scenarios where maintaining the body scroll is necessary while the modal is open.

Proposed Solution:

Add a prop to the modal component that allows users to specify whether the body position should be fixed when the modal is opened.

For example:

 <Drawer.Root
        preventFixedBody
@pukmajster
Copy link
Sponsor

doesn't the noBodyStyles prop solve this?

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

2 participants