[joy-ui] Typography crashes if used with dangerouslySetInnerHtml
#40058
Labels
component: Typography
The React component.
on hold
There is a blocker, we need to wait
package: joy-ui
Specific to @mui/joy
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
https://codesandbox.io/p/sandbox/dazzling-visvesvaraya-y9tgkk
Steps:
Current behavior 😯
Uncaught Error: Can only set one of
children
orprops.dangerouslySetInnerHTML
.Expected behavior 🤔
Renders text
Context 🔦
Render md -> html and set it as content of the typography.
I'm not sure how to apply typography's styles to text otherwise
Your environment 🌎
npx @mui/envinfo
System:
OS: Windows 11 10.0.22621
Binaries:
Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Chromium (119.0.2151.97)
npmPackages:
@emotion/react: ^11.11.1 => 11.11.1
@emotion/styled: ^11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.25 => 5.0.0-beta.25
@mui/icons-material: ^5.14.19 => 5.14.19
@mui/joy: 5.0.0-beta.16 => 5.0.0-beta.16
@types/react: ^18.2.39 => 18.2.39
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
typescript: ^5.3.2 => 5.3.2
The text was updated successfully, but these errors were encountered: