Skip to content

Conversation

@sai6855
Copy link
Contributor

@sai6855 sai6855 commented Aug 8, 2024

@sai6855 sai6855 marked this pull request as draft August 8, 2024 06:17
@mui-bot
Copy link

mui-bot commented Aug 8, 2024

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 68ea769

@sai6855 sai6855 added docs Improvements or additions to the documentation. scope: system The system, the design tokens / styling foundations used across components. eg. @mui/system with MUI labels Aug 8, 2024
@sai6855 sai6855 marked this pull request as ready for review August 8, 2024 06:34
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`.
Copy link
Member

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?

Copy link
Contributor Author

@sai6855 sai6855 Aug 8, 2024

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?

Copy link
Member

@mnajdova mnajdova Aug 9, 2024

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 ☝️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: system The system, the design tokens / styling foundations used across components. eg. @mui/system with MUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants