-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[mui-system] Add import statement in docs #43223
Conversation
Netlify deploy previewBundle size report |
docs/data/system/styled/styled.md
Outdated
// If you are using @mui/material | ||
import { styled } from '@mui/material/styles'; | ||
``` | ||
|
||
You can use the utility coming from the `@mui/system` package, or if you are using `@mui/material`, you can import it from `@mui/material/styles`. |
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.
Can we add the snippet after the explanation?
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.
The docs do have a "Basic usage" example here: https://deploy-preview-43223--material-ui.netlify.app/system/styled/#basic-usage. Are you imagining the snippet to be different from the "basic usage" code in some way?
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 just meant to add it after the text in the same section:
You can use the utility coming from the @mui/system
package, or if you are using @mui/material
, you can import it from @mui/material/styles
.
The difference is in the default theme
that is used (if no theme is available in the React context).
import { styled } from '@mui/system';
// If you are using @mui/material
import { styled } from '@mui/material/styles';
This order ☝️
address: https://mui-org.slack.com/archives/C041SDSF32L/p1723047828638299
preview: https://deploy-preview-43223--material-ui.netlify.app/system/styled/#import-path