-
-
Notifications
You must be signed in to change notification settings - Fork 47
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 showing as [object Object] in the DOM #343
Comments
Can you please share a simple reproduction, or a link to a repo that we can check? |
I updated the description with a link to a repro |
I started experimenting with some of the other styling options (
May be related to this issue which appears to have reappeared as of yesterday: mui/material-ui#43487 (comment) FWIW, it's working exactly as expected in a new NextJS project. |
Well that's somewhat promising...it looks like the project is at least configured correctly. |
Could you share the whole error log (if any) ? |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @joebochill How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
It should not make any difference but i was using pnpm since that's what I already had. |
Here's the same project on Stackblitz. In your case, it seems like the plugin is not configured at all. Only then the above error message comes. |
Interestingly enough, I deleted my If it helps anyone else, here's a list of potentially relevant packages that got a version bump in the new lock file:
In any event, it seems to be working after updating the dependencies. Thanks for your help. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @joebochill How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
Steps:
yarn create vite myapp --template react-ts
<div>
withsx
property, e.g.:<div sx={{color: 'red'}}/>
Link to repro: https://github.com/joebochill/pigmentcsstest
Current behavior
The sx prop is not getting converted into className/style. It is rendering in the DOM as [object Object]:
Expected behavior
The sx prop should be converted to className/style and the styles should be applied to the element.
Context
I am just experimenting with PigmentCSS and seeing how it works.
Initially, I was having the same issue defined here about prop-types, but was able to get past that by updating the vite config:
#176
Your environment
npx @mui/envinfo
Search keywords: sx object native element
The text was updated successfully, but these errors were encountered: