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

[nextjs] Cannot use sx prop on layout components #193

Closed
siriwatknp opened this issue Aug 5, 2024 · 0 comments · Fixed by #196
Closed

[nextjs] Cannot use sx prop on layout components #193

siriwatknp opened this issue Aug 5, 2024 · 0 comments · Fixed by #196
Assignees
Labels
bug 🐛 Something doesn't work nextjs

Comments

@siriwatknp
Copy link
Member

siriwatknp commented Aug 5, 2024

Steps to reproduce

Renders the Stack with sx prop:

import Stack from "@mui/material-pigment-css/Stack";

<Stack sx={{}} />

Current behavior

Got this error:

image

Without using sx prop, it works fine.

Also, vite has no issue, so I think this is nextjs-plugin specific

Expected behavior

Should not throw errors

Context

Found this issue from mui/material-ui#43065 (review)

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: sx error

@siriwatknp siriwatknp added status: waiting for maintainer These issues haven't been looked at yet by a maintainer bug 🐛 Something doesn't work nextjs labels Aug 5, 2024
@zannager zannager removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work nextjs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants