Skip to content

[material-ui][Radio] Large size shows warning in consoleΒ #40143

Open
@mbehtemam-dsv

Description

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce πŸ•Ή

Link to live example: https://stackblitz.com/edit/react-hbyt9f-iryn4i?file=Demo.tsx

I've created new size for Radio button , the large size , but I got this warning in chrome developer console. It seems it's because of this line of code

Here is the warning :

react.development.js:209 Warning: Failed prop type: Invalid prop `fontSize` of value `large` supplied to `RadioButtonIcon`, expected one of ["small","medium"].
    at RadioButtonIcon (http://localhost:5173/node_modules/.vite/deps/chunk-HMV62V6O.js?v=72451cad:130:5)
    at Radio2 (http://localhost:5173/node_modules/.vite/deps/chunk-HMV62V6O.js?v=72451cad:240:17)
    at label

I've created a Stackblitz live demo so you can check it.

Current behavior 😯

It show warning in console for

Expected behavior πŸ€”

It should accept custom size without showing warning.

Context πŸ”¦

No response

Your environment 🌎

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

Metadata

Assignees

Labels

component: buttonThis is the name of the generic UI component, not the React module!enhancementThis is not a bug, nor a new feature

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions