@@ -85,13 +85,13 @@ This improves readability and follows the same pattern as regular CSS.
85
85
When the plugin finds ` '.module.css' ` import in the file, it will transform
86
86
** all** CSS classnames to use the imported CSS module. However, you may want
87
87
to use regular CSS classnames and prevent transformations on them. This
88
- can be done by adding ` :g ` at the end of the classname:
88
+ can be done by adding ` g: ` at the start of the classname:
89
89
90
90
``` jsx
91
91
import " ./style.module.css"
92
92
93
93
function Component () {
94
- return < div className= " card-layout:g card-rnd-1" >< / div>
94
+ return < div className= " g: card-layout card-rnd-1" >< / div>
95
95
}
96
96
```
97
97
@@ -120,21 +120,21 @@ function Component() {
120
120
You can use multiple CSS module within a file using Named modules.
121
121
122
122
To use Named CSS modules, you can add labels to each CSS module import
123
- in the file by adding ` : <module-name>` at the end of the path:
123
+ in the file by adding ` <module-name>: ` at the end of the path:
124
124
125
125
``` jsx
126
- import " ./layout.module.css:layout "
127
- import " ./component.module.css:com "
126
+ import " layout: ./layout.module.css"
127
+ import " com: ./component.module.css"
128
128
```
129
129
130
130
And use the same labels for writing your classnames:
131
131
132
132
``` jsx
133
133
function Component () {
134
134
return (
135
- < ul className= " food-items:layout " >
136
- < li className= " food-item:com " >< / li>
137
- < li className= " food-item:com " >< / li>
135
+ < ul className= " layout: food-items" >
136
+ < li className= " com: food-item" >< / li>
137
+ < li className= " com: food-item" >< / li>
138
138
< / ul>
139
139
)
140
140
}
0 commit comments