-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Slider][material-ui] Convert to support CSS extraction #41201
[Slider][material-ui] Convert to support CSS extraction #41201
Conversation
ed00a4e
to
a28f3f0
Compare
Netlify deploy previewhttps://deploy-preview-41201--material-ui.netlify.app/ @material-ui/core: parsed: +0.19% , gzip: +0.14% Bundle size reportDetails of bundle changes (Toolpad) |
export const rootShouldForwardProp = (prop) => shouldForwardProp(prop) && prop !== 'classes'; | ||
|
||
export const slotShouldForwardProp = shouldForwardProp; | ||
export { default as slotShouldForwardProp } from './slotShouldForwardProp'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to extract these to separate files, otherwise we were ending up with importing from the styled.js, which resulted with the error:
/Users/marijanajdova/workspace/mui/apps/node_modules/.pnpm/@wyw-in-js+transform@0.5.0_typescript@5.3.3/node_modules/@wyw-in-js/transform/lib/module.js:223
throw new EvalError(`${e.message} in${this.callstack.join('\n| ')}\n`);
^
EvalError: _systemDefaultTheme is not defined in/Users/marijanajdova/workspace/mui/packages/mui-system/build/createStyled.js
| /Users/marijanajdova/workspace/mui/packages/mui-material/build/styles/slotShouldForwardProp.js
| /Users/marijanajdova/workspace/mui/packages/mui-material/build/Slider/Slider.js
Once the PR is merged, I will update all imports we have in Material UI, so that we don't have to add additional check in the migration steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a different fix in https://github.com/mui/material-ui/pull/41378/files#diff-23f194f4651836b6ce3d86b341074002f86e1bfcf3958c665fdf25a18aecfafb but I think we should have both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Preview: https://deploy-preview-41201--material-ui.netlify.app/material-ui/react-slider/