We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.div
any
Link to live example: https://codesandbox.io/p/devbox/mui-styled-div-tz7n45?file=%2Fsrc%2FApp.tsx
Steps:
Throws error: Uncaught TypeError: _mui_material__WEBPACK_IMPORTED_MODULE_2__.default.div is not a function
Uncaught TypeError: _mui_material__WEBPACK_IMPORTED_MODULE_2__.default.div is not a function
Also the type any is returned.
When using styled('div') instead of styled.div, there is no problem.
styled('div')
No error should be thrown. Both styled('div') and styled.div must work and a reasonable type must be returned.
We try to use MUI with theme scoping with styled-components v6.
npx @mui/envinfo
Used Browser: Chrome System: OS: macOS 12.6.1 Binaries: Node: 16.20.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.19.4 - /usr/local/bin/npm Browsers: Chrome: 119.0.6045.199 Edge: Not Found Safari: 15.6.1 npmPackages: @mui/base: 5.0.0-beta.25 @mui/core-downloads-tracker: 5.14.19 @mui/material: 5.14.19 => 5.14.19 @mui/private-theming: 5.14.19 @mui/styled-engine: 5.14.19 @mui/styled-engine-sc: 6.0.0-alpha.7 => 6.0.0-alpha.7 @mui/system: 5.14.19 @mui/types: 7.2.10 @mui/utils: 5.14.19 @types/react: 17.0.70 => 17.0.70 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 styled-components: 6.1.0 => 6.1.0 typescript: 4.8.4 => 4.8.4
#80425
The text was updated successfully, but these errors were encountered:
@zannager @brijeshb42 Added our support key to the issue description.
Sorry, something went wrong.
styled.div isn't supported in @mui/material.
@mui/material
Duplicate of #29723, #28574.
No branches or pull requests
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/devbox/mui-styled-div-tz7n45?file=%2Fsrc%2FApp.tsx
Steps:
Current behavior 😯
Throws error:
Uncaught TypeError: _mui_material__WEBPACK_IMPORTED_MODULE_2__.default.div is not a function
Also the type
any
is returned.When using
styled('div')
instead ofstyled.div
, there is no problem.Expected behavior 🤔
No error should be thrown. Both
styled('div')
andstyled.div
must work and a reasonable type must be returned.Context 🔦
We try to use MUI with theme scoping with styled-components v6.
Your environment 🌎
npx @mui/envinfo
Support Key
#80425
The text was updated successfully, but these errors were encountered: