Skip to content
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

Fix cannot use theme to override input variant #7636

Merged
merged 9 commits into from
May 9, 2022
Merged

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented May 4, 2022

Closes #7635

  • remove default values for variant, margin, size in all Input components
  • set the default variant, margin, size in the default theme
  • set the default variant, margin, size in the demos theme
  • update the documentation about overriding the theme
  • Add mention in the upgrade guide for custom themes

This PR introduces a small BC break, but I think we cannot wait the next major for that, plus it's an easy fix.

@fzaninotto
Copy link
Member Author

The compilation error seems to come from MUI... mui/material-ui#32659

@vercel vercel bot temporarily deployed to Preview – react-admin May 9, 2022 09:23 Inactive
@fzaninotto fzaninotto added RFR Ready For Review WIP Work In Progress and removed WIP Work In Progress RFR Ready For Review labels May 9, 2022
@vercel vercel bot temporarily deployed to Preview – react-admin May 9, 2022 12:01 Inactive
@fzaninotto fzaninotto added RFR Ready For Review and removed WIP Work In Progress labels May 9, 2022
@fzaninotto
Copy link
Member Author

Switching to RFR

docs/Theming.md Outdated Show resolved Hide resolved
docs/Theming.md Outdated Show resolved Hide resolved
}
+ MuiTextField: {
+ defaultProps: {
+ variant: 'filled',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need as const here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that's JS, not TS

fzaninotto and others added 2 commits May 9, 2022 15:06
Co-authored-by: Jean-Baptiste Kaiser <jb@marmelab.com>
Co-authored-by: Jean-Baptiste Kaiser <jb@marmelab.com>
@djhi djhi merged commit d639c53 into master May 9, 2022
@djhi djhi deleted the Fix-theme-override branch May 9, 2022 13:51
@djhi djhi added this to the 4.0.4 milestone May 9, 2022
@fzaninotto fzaninotto changed the title Use theme to set input variant Fix cannot use theme to override input variant May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot override defaultProps using variants
3 participants