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

Modal component does not support sx prop #4058

Closed
alexe-dev opened this issue Apr 12, 2023 · 2 comments
Closed

Modal component does not support sx prop #4058

alexe-dev opened this issue Apr 12, 2023 · 2 comments

Comments

@alexe-dev
Copy link

alexe-dev commented Apr 12, 2023

What package has an issue

@mantine/core

Describe the bug

<Modal /> component does not support sx prop after a change to ModalProps type in this commit:

a013d98

export interface ModalProps extends Omit<DefaultProps<ModalStylesNames, ModalStylesParams>, MantineStyleSystemSize>, Omit<React.ComponentPropsWithoutRef<'div'>, 'title'>

changed to

export interface ModalProps extends ModalRootProps

and as ModalRootProps does not have sx prop in it, <Modal /> does not accept sx prop anymore

my exact usecase is sx={{ maxHeight: '90vh' }}

if it was an intended breaking change, then it should be added to CHANGELOG. And please let me know if there is another proper way to handle my use case.

What version of @mantine/hooks page do you have in package.json?

6.0.7

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

add sx prop to ModalRootProps

@alexe-dev
Copy link
Author

ps I will use style api to target Modal root for now

@rtivital
Copy link
Member

Fixed in 6.0.8

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