-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Use styled
from system
#8032
Conversation
Netlify deploy previewNetlify deploy preview: https://deploy-preview-8032--material-ui-x.netlify.app/ Updated pagesNo updates. These are the results for the performance tests:
|
@@ -2,7 +2,7 @@ import * as React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import clsx from 'clsx'; | |||
import { unstable_composeClasses as composeClasses } from '@mui/utils'; | |||
import { styled, SxProps, Theme } from '@mui/material/styles'; | |||
import { styled, SxProps, Theme } from '@mui/system'; |
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.
Based on mui/material-ui#35840, could we use nested imports here ?
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.
styled
is exported directly from the index. It does not have a nested folder after the build. We could improve it on the core but it should not block this PR.
Both of these are the same (in terms of efficiency).
import { styled } from '@mui/material/styles';
import { styled } from '@mui/system';
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.
🎉
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@cherniavskii I decided to add Note, I think we can just use a simple string for referring to a CSS variable since the syntax |
The changes contain 2 patterns:
1. A simple conversion from
@mui/material/styles
to@mui/system
.These component does not use Material UI theme tokens, so I think it is safe to start using
@mui/system
.2. Migrate from Material UI theme token to DataGrid CSS variables. These variables are defined by a single
GridRootStyles
.Here is what it looks like when we have Joy UI integrated: