You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* You are warned when `localClassName` refers to an undefined CSS Module ([`errorWhenNotFound`](#errorwhennotfound) option).
91
+
* You are warned when `styleName` refers to an undefined CSS Module ([`errorWhenNotFound`](#errorwhennotfound) option).
92
92
* You can enforce use of a single CSS module per `ReactElement` ([`allowMultiple`](#allowmultiple) option).
93
93
94
94
## The Implementation
95
95
96
-
`react-css-modules` extends `render` method of the target component. It will use the value of `localClassName` to look for CSS Modules in the associated styles object and will append the matching unique CSS class names to the `ReactElement``className` property value.
96
+
`react-css-modules` extends `render` method of the target component. It will use the value of `styleName` to look for CSS Modules in the associated styles object and will append the matching unique CSS class names to the `ReactElement``className` property value.
Throws an error when `localClassName` cannot be mapped to an existing CSS Module.
227
+
Throws an error when `styleName` cannot be mapped to an existing CSS Module.
228
228
229
229
## SASS, SCSS, LESS and other CSS Preprocessors
230
230
@@ -275,7 +275,7 @@ Composition promotes better separation of markup and style using semantics that
275
275
276
276
To learn more about composing CSS rules, I suggest reading Glen Maddern article about [CSS Modules](http://glenmaddern.com/articles/css-modules) and the official [spec of the CSS Modules](https://github.com/css-modules/css-modules).
277
277
278
-
That said, if you enable [`allowMultiple`](#allowmultiple) option, you can map multiple CSS Modules to a single `ReactElement`. `react-css-modules` will append a unique class name for every CSS Module it matches in the `localClassName` declaration, e.g.
278
+
That said, if you enable [`allowMultiple`](#allowmultiple) option, you can map multiple CSS Modules to a single `ReactElement`. `react-css-modules` will append a unique class name for every CSS Module it matches in the `styleName` declaration, e.g.
279
279
280
280
```css
281
281
.button {
@@ -288,7 +288,7 @@ That said, if you enable [`allowMultiple`](#allowmultiple) option, you can map m
288
288
```
289
289
290
290
```js
291
-
<div localClassName='button active'></div>
291
+
<div styleName='button active'></div>
292
292
```
293
293
294
294
This will map both [Interoperable CSS](https://github.com/css-modules/icss) CSS classes to the target element.
0 commit comments