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

styled with shouldForwardProp breaks forwarding of internal props #45014

Open
pushys opened this issue Jan 13, 2025 · 0 comments
Open

styled with shouldForwardProp breaks forwarding of internal props #45014

pushys opened this issue Jan 13, 2025 · 0 comments
Assignees
Labels
package: system Specific to @mui/system status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@pushys
Copy link
Contributor

pushys commented Jan 13, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/github-ljljbrse?file=src%2FApp.tsx
  2. Inspect the div node.

Current behavior

If you inspect the node, it has internal props such as as or sx forwarded directly to HTML.
image

Expected behavior

Internal props should not be forwarded to HTML nodes when shouldForwardProp is provided.

Context

No response

Your environment

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

Search keywords: styled, shouldForwardProp

@pushys pushys added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 13, 2025
@zannager zannager added the package: system Specific to @mui/system label Jan 13, 2025
@brijeshb42 brijeshb42 assigned siriwatknp and unassigned brijeshb42 Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants