-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Failed prop type: "deprecatedVariants" is read-only in Typography #13245
Failed prop type: "deprecatedVariants" is read-only in Typography #13245
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Too update variants follow this instruction: https://material-ui.com/style/typography/#migration-to-typography-v2 However I have updated variants and still got this issue. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We located the issue and have a potential fix pending for review. Please don't spam this thread with "+1". This just floods notifications for everyone subscribed to this issue. You can use the reactions feature instead. |
The upstream issue should be fixed with oliviertassinari/babel-plugin-transform-react-remove-prop-types#167. We need to release it now. |
can not solve the problem, the console continues to indicate the following warning: Warning: Failed prop type: "deprecatedVariants" is read-only.... could you help me please? #Thanks.. |
@JulianPovedaM The fix is not released yet. We can't offer a solution other than manually editing your One solution could be to clone, build locally and link in your app since the fix in the babel plugin is already released. But please don't ask in this thread how to do this. This is out of scope for this issue. |
Will this go out in a patch release or in 3.4.0? If it's a patch release, any time frame estimates? |
Thank you for the patience, v3.2.2 was released, let us know if it's all good :). |
Fixes it for me! Great turnaround! |
All good on my side too! |
I had 3.2.1 that I installed yesterday, and got here from a google search to find out that 3.2.2 is out! First time I get to an issue right as it gets fixed! Good Job. |
@oliviertassinari I'm actually confused here. I get the same warning and in spite of the const theme = createMuiTheme({
typography: {
useNextVariants: true
},
palette: {
primary: {
main: "#50c9c3",
light: "#87fcf6",
dark: "#009893",
contrastText: "#000000"
},
secondary: {
main: "#80d8ff",
light: "#b5ffff",
dark: "#49a7cc",
contrastText: "#000000"
}
}
}); I had a look at the code: here:https://github.com/mui-org/material-ui/blob/b895ee783b13a50d4ab0a92c2ea15c2ff7f1e8ae/packages/material-ui/src/styles/createTypography.js#L38 It seems that calling EDIT: did I get the guide wrong? I actually updated all my styles manually throughout the app to use the new variant (ie. replacing |
@jraoult Please post the warning message. The warning message in the code you linked will only trigger if the condition is false. |
EDIT: @eps1lon hmm. I probably spoke to fast. I can't see the message anymore. I wonder if my |
@oliviertassinari I'm having an error while using Typography and it's saying |
We require for the theme to have a certain shape. If a 3rd party package wants to create themes for this library it should match the shape. Full shape: https://github.com/mui-org/material-ui/blob/994c376bb2d07d70b67182be60afd4ad7e247478/packages/material-ui/src/styles/createMuiTheme.d.ts#L30-L43 |
Just updated to v3.2.1 and am getting the following error in console:
Failed prop type: "deprecatedVariants" is read-only in Typography (created by WithStyles(Typography))
Any ideas?
Your Environment
The text was updated successfully, but these errors were encountered: