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

SX prop not available in MuiImageProps #18

Open
GlenOttley opened this issue Aug 28, 2022 · 4 comments
Open

SX prop not available in MuiImageProps #18

GlenOttley opened this issue Aug 28, 2022 · 4 comments

Comments

@GlenOttley
Copy link

Hey,

The documentation shows that we should be able to pass the 'sx' prop in the last usage example, however it is missing from the props table below this and is not available in the MuiImageProps interface.

Please let me know if I have missed something here

@benmneb
Copy link
Owner

benmneb commented Aug 28, 2022

Nice. I completely forgot about this when doing the types. Just made me notice #19 also

@n3m
Copy link

n3m commented Nov 21, 2022

@benmneb Any updates on adding back this prop?

Edit: Nvm just saw the other issue

@MartinJohannesNilsen
Copy link

@benmneb
This seems to still be an issue, as I get the following error:

Property 'sx' does not exist on type 'IntrinsicAttributes & MuiImageProps & { children?: ReactNode; }

However, when I added sx?: SxProps<Theme>; to the interface it rendered as normal. Am I doing something wrong? I cannot find the sx-prop present in the npm type package either. A fix would be highly appreciated!

@MartinJohannesNilsen
Copy link

Added this line, which seems to work for me, in a new pull request to the DefinitelyTyped repo:

DefinitelyTyped/DefinitelyTyped/pull/64808

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

4 participants