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

chore: Tidy up hardcoded MUI classnames #3000

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Apr 9, 2024

Small tidy up / refactor I hit when working on #2993

MUI offers classnames as an import so we can avoid hardcoding these 👍

@DafyddLlyr DafyddLlyr force-pushed the dp/tidy-up-mui-classnames branch from d519f1c to bb49f57 Compare April 9, 2024 12:52
@@ -58,7 +60,7 @@ const StyledAccordionSummary = styled(AccordionSummary)(({ theme }) => ({
padding: "0",
margin: "0",
minHeight: "0",
"&.Mui-expanded": {
[`&.${accordionClasses.root}.Mui-expanded`]: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Global classnames like Mui-expanded should not be used in isolation -

Never apply styles directly to state class names. This will impact all components with unclear side-effects. Always target a state class together with a component.

Docs: https://mui.com/material-ui/customization/how-to-customize/#overriding-styles-with-class-names

@DafyddLlyr DafyddLlyr requested a review from a team April 9, 2024 12:54
@DafyddLlyr DafyddLlyr marked this pull request as ready for review April 9, 2024 12:54
Copy link
Contributor

@ianjon3s ianjon3s left a comment

Choose a reason for hiding this comment

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

Looks good, I'll use these changes for ref when adding state classes to components.

Copy link

github-actions bot commented Apr 9, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr merged commit 8900e4c into main Apr 9, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/tidy-up-mui-classnames branch April 9, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants