Skip to content

Commit 443b289

Browse files
authored
edit "How to use components selector API"
- 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>
1 parent 1a129d8 commit 443b289

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/data/system/styled/styled.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ module.exports = {
274274
styledBaseImport: ["@mui/system", "styled"]
275275
}
276276
},
277+
"@mui/material": {
278+
"styled": {
279+
"canonicalImport": ["@emotion/styled", "default"],
280+
"styledBaseImport": ["@mui/material", "styled"]
281+
}
282+
},
277283
"@mui/material/styles": {
278284
styled: {
279285
canonicalImport: ["@emotion/styled", "default"],
@@ -288,4 +294,8 @@ module.exports = {
288294

289295
```
290296

297+
:::info
298+
Note: if [`babel-plugin-direct-import`](https://github.com/avocadowastaken/babel-plugin-direct-import) used, it must be after `@emotion/babel-plugin`.
299+
:::
300+
291301
Now you should be able to use components as your selectors!

0 commit comments

Comments
 (0)