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

Unable to pass styles or sx prop to HoverCard due to Typescript #3257

Closed
amitsingh-007 opened this issue Dec 29, 2022 · 1 comment
Closed
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@amitsingh-007
Copy link

amitsingh-007 commented Dec 29, 2022

What package has an issue

@mantine/core

Describe the bug

Basically the title. Unable to pass styles or sx prop to Hovercard since TypeScript throws the following error:

Property 'styles' does not exist on type 'IntrinsicAttributes & HoverCardProps'.

Using @ts-ignore temporarily solves the issue. The styles does apply, its just that TypeScript throws the error.
Same thing with sx prop.

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

5.9.5

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

https://codesandbox.io/s/wandering-hooks-d71k9u?file=/src/App.tsx

Do you know how to fix the issue

None

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

None

Possible fix

I think it's due to HoverCardProps extends PopoverBaseProps but PopoverProps has styles prop. Maybe we can extend PopoverProps or add missing props in HoverCardProps. If the fix is simple, I will be happy to raise a PR.

rtivital added a commit that referenced this issue Jan 17, 2023
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Jan 17, 2023
@rtivital
Copy link
Member

Fixed in 5.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants