Skip to content

Commit 890172d

Browse files
committed
docs: document anonymous reference convention
1 parent 4587176 commit 890172d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ In contrast to [`react-css-modules`](https://github.com/gajus/react-css-modules)
1515
* [Performance](#performance)
1616
* [How does it work?](#how-does-it-work)
1717
* [Conventions](#conventions)
18+
* [Anonymous reference](#anonymous-reference)
1819
* [Named reference](#named-reference)
1920
* [Configuration](#configuration)
2021
* [Example transpilations](#example-transpilations)
@@ -88,6 +89,21 @@ Missing a configuration? [Raise an issue](https://github.com/gajus/babel-plugin-
8889

8990
## Conventions
9091

92+
### Anonymous reference
93+
94+
Anonymous reference can be used when there is only one stylesheet import.
95+
96+
Format: `CSS module name`.
97+
98+
Example:
99+
100+
```js
101+
import './foo1.css';
102+
103+
// Imports "a" CSS module from ./foo1.css.
104+
<div styleName="a"></div>;
105+
```
106+
91107
### Named reference
92108

93109
Named reference is used to refer to a specific stylesheet import.

0 commit comments

Comments
 (0)