Skip to content

Commit

Permalink
fix: Incorrect MUI classes syntax (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Jun 30, 2023
1 parent 141084b commit a29e0d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const StyledAccordion = styled(Accordion)(({ theme }) => ({
"&.Mui-expanded": {
margin: "0",
},
[`& .${classes.removeTopBorder}`]: {
[`&.${classes.removeTopBorder}`]: {
"&:before": {
display: "none",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Root = styled(Drawer, {
marginRight: "-100%",
},

[`& .${classes.drawerPaper}`]: {
[`&.${classes.drawerPaper}`]: {
width: drawerWidth,
backgroundColor: theme.palette.background.default,
border: 0,
Expand Down
8 changes: 2 additions & 6 deletions editor.planx.uk/src/ui/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const PREFIX = "Input";

const classes = {
multiline: `${PREFIX}-multiline`,
adornedEnd: `${PREFIX}-adornedEnd`,
focused: `${PREFIX}-focused`,
};

Expand Down Expand Up @@ -63,17 +62,14 @@ const StyledInputBase = styled(InputBase, {
width: "100%",
fontWeight: FONT_WEIGHT_SEMI_BOLD,
}),
[`& .${classes.multiline}`]: {
[`&.${classes.multiline}`]: {
height: "auto",
"& textarea": {
padding: theme.spacing(1.5, 0),
lineHeight: 1.6,
},
},
[`& .${classes.adornedEnd}`]: {
paddingRight: 2,
},
[`& .${classes.focused}`]: {
[`&.${classes.focused}`]: {
...(bordered && borderedFocusStyle),
},
}));
Expand Down
8 changes: 4 additions & 4 deletions editor.planx.uk/src/ui/SelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Root = styled(Select)(({ theme }) => ({
padding: theme.spacing(0, 1.5),
height: 50,
backgroundColor: "#fff",
[`& .${classes.rootSelect}`]: {
[`&.${classes.rootSelect}`]: {
paddingRight: theme.spacing(6),
boxSizing: "border-box",
backgroundColor: "#fff",
Expand All @@ -34,11 +34,11 @@ const Root = styled(Select)(({ theme }) => ({
alignItems: "center",
justifyContent: "flex-start",
},
[`& .${classes.icon}`]: {
[`&.${classes.icon}`]: {
right: theme.spacing(1),
color: "rgba(0,0,0,0.25)",
},
[`& .${classes.menuPaper}`]: {
[`&.${classes.menuPaper}`]: {
border: `2px solid ${theme.palette.primary.light}`,
borderTop: 0,
marginTop: -2,
Expand All @@ -59,7 +59,7 @@ const Root = styled(Select)(({ theme }) => ({
height: "auto",
},
},
[`& .${classes.inputSelect}`]: {
[`&.${classes.inputSelect}`]: {
backgroundColor: "transparent",
fontSize: "1rem",
"&:focus": {
Expand Down

0 comments on commit a29e0d0

Please sign in to comment.