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
[docs] Demonstrate TextField
customization using theme style overrides
#36805
[docs] Demonstrate TextField
customization using theme style overrides
#36805
Conversation
TextField
customization using theme style overrides
Netlify deploy previewBundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, thanks for working on this, @ZeeshanTamboli! Before continuing with the design tweaks, can I ask for you to set up dark mode to work on this? We should have demos that work on both modes instead of fixating it to one through a hard-coded dark bg 😬
…ession test to capture screenshot
@danilo-leal Done. The custom theme provider is inside our doc's theme provider, and due to the custom theme overriding the doc's one, the default Material UI text field styles were not getting applied appropriately on both modes. That's the reason I had hard-coded the background. But we can get the palette mode of our docs i.e the outer theme's mode and apply it in our custom theme. So, now, I used |
@danilo-leal Can you review this further? |
@danilo-leal I think you were about to review. Any updates on this? |
@ZeeshanTamboli Hey, yeah! Thanks for optimizing it for dark mode 🤝 I'll put in some time to go over this PR this week so we can get it out on the next release⎯thanks for the heads up! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great now! Thanks for the patience + effort 🤙
…des (mui#36805) Co-authored-by: Danilo Leal <danilo@material-ui.com> Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Closes #33387
Closes #33931
This PR is to demonstrate the customization of the
TextField
component using theme style overrides as raised in #33387. The developers will take a look at our documentation, which will show the correct way to do this. It is particularly useful to demonstrate it for theTextField
component because it uses multiple sub-components within it (based on variant) and is not straightforward to override.We showcase how to apply different styles to the default component and with the
hover
andfocused
states.The colors may not look ideal in both light and dark modes. A better design can be suggested. cc @danilo-leal
Preview: https://deploy-preview-36805--material-ui.netlify.app/material-ui/react-text-field/#using-the-theme-style-overrides-api