You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, it happens even in the live example codesandbox IDE of the official doc.
Steps:
Include any Material UI Icon in your code. i.e:
import Person from '@mui/icons-material/Person';
...
<Person />
Add it the fontSize property with any of the officially supported sizes (xs, sm, md, lg, xl, xl2, xl3 or xl4):
import Person from '@mui/icons-material/Person';
...
<Person fontSize="xl2" />
You will see the icon size applied, but the code will be highlighted with a TypeScript error telling that the only supported sizes are "small, medium or large", while none of these values actually works if you followed the "Material UI Icons Installation instructions".
Current behavior 😯
Putting the correct values (xs, sm, md, lg, xl, xl2, xl3 or xl4) in fontSize property works, but TypeScript error is raised.
Putting the incorrect values (small, medium or large) in fontSize property doesn't work, but TypeScript likes it.
Expected behavior 🤔
Putting the correct values (xs, sm, md, lg, xl, xl2, xl3 or xl4) in fontSize property works and TypeScript likes it.
Putting the incorrect values (small, medium or large) in fontSize property doesn't work and TypeScript raise an error.
Context 🔦
Just trying to customize the size of icons inside my app with the official fontSize prop to avoid css granular customization.
@siriwatknp Not sure about keys in TypographySystem, as it lists "body-sm", "body-md", etc.
What we want, from joy-ui documentation are sizes from xs to xl4
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/blissful-night-4v3x2j?file=%2Fsrc%2FDemo.tsx (The one available in the offcial "Material UI Icons Size doc")
As you can see, it happens even in the live example codesandbox IDE of the official doc.
Steps:
Current behavior 😯
Expected behavior 🤔
Context 🔦
Just trying to customize the size of icons inside my app with the official fontSize prop to avoid css granular customization.
Your environment 🌎
npx @mui/envinfo
tsconfig
The text was updated successfully, but these errors were encountered: