Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Feb 25, 2024
1 parent fe61961 commit 55c9e10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@ export default function transformer(file, api, options) {
});
});

const selectorRegex = new RegExp(`^${replacementSelectorPrefix}${deprecatedClass}`);
const selector = `${replacementSelectorPrefix}${deprecatedClass}`;
root
.find(
j.Literal,
(literal) => typeof literal.value === 'string' && literal.value.match(selectorRegex),
(literal) => typeof literal.value === 'string' && literal.value === selector,
)
.forEach((path) => {
path.replace(
j.literal(
path.value.value.replace(
selectorRegex,
selector,
`${replacementSelectorPrefix}${replacementSelector}`,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import { buttonGroupClasses } from '@mui/material/ButtonGroup';
("&.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text > .MuiButtonGroup-groupedHorizontal");
("&.MuiButtonGroup-text > .MuiButtonGroup-groupedVertical");
("&.MuiButtonGroup-text > .MuiButtonGroup-groupedPrimary");
("&.MuiButtonGroup-text > .MuiButtonGroup-groupedSecondary");
("&.MuiButtonGroup-text.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-text.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined > .MuiButtonGroup-groupedHorizontal");
("&.MuiButtonGroup-outlined > .MuiButtonGroup-groupedVertical");
("&.MuiButtonGroup-outlined > .MuiButtonGroup-groupedPrimary");
("&.MuiButtonGroup-outlined > .MuiButtonGroup-groupedSecondary");
("&.MuiButtonGroup-outlined.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-outlined.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained > .MuiButtonGroup-groupedHorizontal");
("&.MuiButtonGroup-contained > .MuiButtonGroup-groupedVertical");
("&.MuiButtonGroup-contained > .MuiButtonGroup-groupedPrimary");
("&.MuiButtonGroup-contained > .MuiButtonGroup-groupedSecondary");
("&.MuiButtonGroup-contained.MuiButtonGroup-horizontal > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-vertical > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-colorPrimary > .MuiButtonGroup-grouped");
("&.MuiButtonGroup-contained.MuiButtonGroup-colorSecondary > .MuiButtonGroup-grouped");
`&.${buttonGroupClasses.horizontal} > .${buttonGroupClasses.grouped}`;
`&.${buttonGroupClasses.vertical} > .${buttonGroupClasses.grouped}`;
`&.${buttonGroupClasses.text} > .${buttonGroupClasses.grouped}`;
Expand Down

0 comments on commit 55c9e10

Please sign in to comment.