Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "emotion", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "css prop for all", | ||
@@ -27,2 +27,3 @@ "files": [ | ||
"glam": "^4.0.3", | ||
"glamor": "^2.20.25", | ||
"jest": "^20.0.1", | ||
@@ -29,0 +30,0 @@ "jest-glamor-react": "^1.3.0", |
@@ -11,2 +11,4 @@ # emotion | ||
- [Install](#install) | ||
- [Glam](#emotionglam) | ||
- [Glamor](#emotionglamor) | ||
@@ -48,1 +50,29 @@ ## Install | ||
## `emotion/glamor` | ||
```bash | ||
npm install -S glamor | ||
``` | ||
**.babelrc** | ||
```json | ||
{ | ||
"plugins": [ | ||
"emotion/glamor", | ||
] | ||
} | ||
``` | ||
```jsx harmony | ||
const Name = ({ color, name }) => <h1 css={{ color: 'red' }}>{name}</h1> | ||
``` | ||
is converted to | ||
```jsx harmony | ||
const Name = ({ color, name }) => <h1 {...css({color: 'red' })}>{name}</h1> | ||
``` | ||
**Similar to importing React when using jsx, `import {css} from 'glamor'` must be at the top of your source files.** | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20064
13
372
77
17