Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "emotion", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "👩🎤 Glam + React", | ||
@@ -5,0 +5,0 @@ "jsnext:main": "dist/emotion.es.js", |
@@ -35,5 +35,5 @@ # emotion | ||
```jsx | ||
import { emotion } from 'emotion' | ||
import { styled } from 'emotion' | ||
const H1 = emotion('h1')` | ||
const H1 = styled('h1')` | ||
color: 'blue'; | ||
@@ -51,3 +51,3 @@ font-size: 48px; | ||
const H2 = emotion(H1)` | ||
const H2 = styled(H1)` | ||
font-size: ${fontSize * 2/3}px; | ||
@@ -63,3 +63,3 @@ color: 'red'; | ||
const H3 = emotion.h3` | ||
const H3 = styled.h3` | ||
font-size: ${fontSize * 1/3}px; | ||
@@ -91,3 +91,3 @@ color: 'red'; | ||
```jsx | ||
const H1 = emotion.h1` | ||
const H1 = styled.h1` | ||
font-size: attr(fontSize px); | ||
@@ -94,0 +94,0 @@ margin: attr(margin rem, 4); |
@@ -171,2 +171,10 @@ /* eslint-disable jsx-quotes,no-useless-escape,no-template-curly-in-string */ | ||
test('with spread arg in jsx opening tag', () => { | ||
const basic = '(<div className="a" css={`color: brown;`} {...rest}></div>)' | ||
const {code} = babel.transform(basic, { | ||
plugins: [plugin, ['glam/babel', {inline: true}]] | ||
}) | ||
expect(code).toMatchSnapshot() | ||
}) | ||
test('css empty', () => { | ||
@@ -173,0 +181,0 @@ const basic = '(<div css=""></div>)' |
@@ -149,2 +149,6 @@ module.exports = function (babel) { | ||
path.get('attributes').forEach(openElPath => { | ||
if (t.isJSXSpreadAttribute(openElPath.node)) { | ||
return | ||
} | ||
const attrPath = openElPath.get('name') | ||
@@ -151,0 +155,0 @@ const name = attrPath.node.name |
Sorry, the diff of this file is not supported yet
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
40649
748