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

Switch over MUI components to new Styled format so we can upgrade #5299

Open
nabramow opened this issue Dec 7, 2024 · 0 comments · May be fixed by #5481
Open

Switch over MUI components to new Styled format so we can upgrade #5299

nabramow opened this issue Dec 7, 2024 · 0 comments · May be fixed by #5481
Assignees

Comments

@nabramow
Copy link
Member

nabramow commented Dec 7, 2024

Before we can upgrade MUI to v6 and above, we need to finish changed over our style from makeStyles to the new Styled.

If you search Styled you should find many examples already done.

This ticket should be relatively straight-forward though it will be a lot of changes. Feel free to do PRs in sections, as it makes it easier to test, i.e. do a group of 10 components in 1 PR, open it. Do another PR with another 10.

** Make sure to import styled from @mui/material (it comes up from other packages in the suggestions).**

Please name the new styled components starting with Styled, i.e. StyledAlert, StyledCollapse, etc..

Here is the migration from JSS guide from MUI if it helps:
https://mui.com/material-ui/migration/migrating-from-jss/

Old way:

const useStyles = makeStyles((theme) => ({
  root: {
    marginBottom: theme.spacing(2),
  },
}));

New way:

import { theme } from "theme";

const StyledAlert = styled("div", {
    marginBottom: theme.spacing(2),
});
@nabramow nabramow converted this from a draft issue Dec 7, 2024
@nabramow nabramow changed the title Switch over MUI components to new Styled format Switch over MUI components to new Styled format so we can upgrade Dec 7, 2024
@jkurlowicz jkurlowicz self-assigned this Dec 10, 2024
@nabramow nabramow moved this from Ready to In Progress in Couchers Engineering 💻 Dec 12, 2024
@nabramow nabramow assigned nabramow and unassigned jkurlowicz Jan 6, 2025
@nabramow nabramow linked a pull request Jan 18, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants