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

[docs] Fix wrong code snippet for overriding styles in theme with a callback value #32781

Conversation

ZeeshanTamboli
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli commented May 16, 2022

Fixes #32760

Callback as a value is in the CSS class properties not in the styleOverrides key.

In any case, I think, this particular code snippet with the following description doesn't match:

Each component is composed of several different parts.
These parts correspond to classes that are available to the component—see the **CSS** section of the component's API page for a detailed list.
You can use these classes inside the `styleOverrides` key to modify the corresponding parts of the component.

Also this sub-section seems redundant with the section below: Overrides based on props.

I would propose to remove this sub-section which was added in #31997.

Preview: https://deploy-preview-32781--material-ui.netlify.app/material-ui/customization/theme-components/#global-style-overrides

@mui-bot
Copy link

mui-bot commented May 16, 2022

No bundle size changes

Generated by 🚫 dangerJS against cd4da69

@ZeeshanTamboli ZeeshanTamboli added the docs Improvements or additions to the documentation label May 16, 2022
@danilo-leal
Copy link
Contributor

danilo-leal commented May 16, 2022

Nice! I'll leave that up to @siriwatknp as he's definitely more of an expert on this than I am. Thanks for stepping up!

@danilo-leal danilo-leal removed their request for review May 16, 2022 16:09
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

👍 Nice catch! please see my comment before merging.

@ZeeshanTamboli ZeeshanTamboli merged commit 6972036 into mui:master May 17, 2022
@ZeeshanTamboli ZeeshanTamboli deleted the theme-components-global-styleOverrides-docs branch May 17, 2022 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Wrong code snippet for overriding styles in theme with a callback value
4 participants