Skip to content

Commit

Permalink
support binary expression
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jun 4, 2024
1 parent eec27cc commit 7533f08
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mui-codemod/src/v6.0.0/sx-prop/sx-v6.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ export default function sxV6(file, api, options) {
(returnExpression.type === 'CallExpression' &&
getObjectKey(returnExpression.callee)?.name === 'theme') ||
(returnExpression.type === 'MemberExpression' &&
getObjectKey(returnExpression)?.name === 'theme')
getObjectKey(returnExpression)?.name === 'theme') ||
(returnExpression.type === 'BinaryExpression' &&
(getObjectKey(returnExpression.left)?.name === 'theme' ||
getObjectKey(returnExpression.right)?.name === 'theme'))
) {
data.replaceValue?.(returnExpression);
rootThemeCallback(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ function FacebookCircularProgress(props) {
p: 4,
}}
></Box>;

<Backdrop
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
open={open}
onClick={handleClose}
>
<CircularProgress color="inherit" />
</Backdrop>;
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,14 @@ function FacebookCircularProgress(props) {
p: 4
})}
></Box>;

<Backdrop
sx={theme => ({
color: '#fff',
zIndex: theme.zIndex.drawer + 1
})}
open={open}
onClick={handleClose}
>
<CircularProgress color="inherit" />
</Backdrop>;

0 comments on commit 7533f08

Please sign in to comment.