Skip to content

Commit

Permalink
[docs][material-ui][system] Edit "How to use components selector API"…
Browse files Browse the repository at this point in the history
… section to add about direct import (#43377)

Signed-off-by: Ilya Molostov <29124424+IAluI@users.noreply.github.com>
Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
  • Loading branch information
IAluI and ZeeshanTamboli authored Sep 10, 2024
1 parent f01c2f3 commit 810e99a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/data/system/styled/styled.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ module.exports = {
styledBaseImport: ["@mui/system", "styled"]
}
},
"@mui/material": {
styled: {
canonicalImport: ["@emotion/styled", "default"],
styledBaseImport: ["@mui/material", "styled"]
}
},
"@mui/material/styles": {
styled: {
canonicalImport: ["@emotion/styled", "default"],
Expand All @@ -294,4 +300,8 @@ module.exports = {

```

:::info
Note: If you use [`babel-plugin-direct-import`](https://github.com/avocadowastaken/babel-plugin-direct-import), place it after `@emotion/babel-plugin` in the Babel config.
:::

Now you should be able to use components as your selectors!

0 comments on commit 810e99a

Please sign in to comment.