aesthetic-adapter-css-modules
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,5 @@ | ||
# 2.0.2 - 03/20/18 | ||
#### 🛠 Internal | ||
* Updated dependencies. | ||
# 2.0.1 - 01/13/18 | ||
@@ -2,0 +6,0 @@ #### 🛠 Internal |
{ | ||
"name": "aesthetic-adapter-css-modules", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "CSS modules support for Aesthetic.", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
"babel-runtime": "^6.26.0", | ||
"prop-types": "^15.6.0" | ||
"prop-types": "^15.6.1" | ||
}, | ||
@@ -25,5 +25,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@milesj/build-tool-config": "^0.48.0", | ||
"aesthetic": "^2.2.0" | ||
"@milesj/build-tool-config": "^0.50.0", | ||
"aesthetic": "^2.2.2" | ||
} | ||
} |
@@ -6,7 +6,2 @@ # Aesthetic with CSS Modules | ||
> This library does not enable CSS modules, it simply applies the class names to the | ||
> React component. Supporting CSS modules will need to be enabled with | ||
> [Webpack](https://github.com/webpack/css-loader) or | ||
> [Babel](https://github.com/michalkvasnicak/babel-plugin-css-modules-transform). | ||
## Requirements | ||
@@ -25,34 +20,1 @@ | ||
``` | ||
## Usage | ||
More information on how to get started can be found in the | ||
[official documentation](https://github.com/milesj/aesthetic). | ||
```javascript | ||
import Aesthetic from 'aesthetic'; | ||
import CSSModulesAdapter from 'aesthetic-adapter-css-modules'; | ||
const aesthetic = new Aesthetic(new CSSModulesAdapter()); | ||
``` | ||
### Unified Syntax | ||
CSS modules do not support Aesthetic's unified syntax. | ||
### Usage | ||
When defining styles for a React component, simply pass the CSS modules object to | ||
the styler function, instead of setting the element `className` props directly. | ||
```javascript | ||
import React from 'react'; | ||
import style from '../path/to/styler'; | ||
import styles from './styles.css'; | ||
function Component() { | ||
// ... | ||
} | ||
export default style(styles)(Component); | ||
``` |
4919
8
19
Updatedprop-types@^15.6.1