Skip to content

Commit

Permalink
edit "How to use components selector API"
Browse files Browse the repository at this point in the history
- add @mui/material to @emotion/babel-plugin config
- add note about @emotion/babel-plugin and babel-plugin-direct-import order

Signed-off-by: Ilya Molostov <29124424+IAluI@users.noreply.github.com>
  • Loading branch information
IAluI authored and Molostov Ilya committed Sep 9, 2024
1 parent 64aaf56 commit 2645f39
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 [`babel-plugin-direct-import`](https://github.com/avocadowastaken/babel-plugin-direct-import) used, it must be after `@emotion/babel-plugin`.
:::

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

0 comments on commit 2645f39

Please sign in to comment.