Comparing version 4.1.1 to 4.1.2
@@ -11,3 +11,2 @@ 'use strict'; | ||
name: 'emotion', // not required | ||
inherits: require('babel-plugin-syntax-jsx'), | ||
visitor: { | ||
@@ -14,0 +13,0 @@ Program: { |
@@ -19,2 +19,3 @@ 'use strict'; | ||
return _react2.default.createElement(tag, Object.assign({}, props, { | ||
ref: props.innerRef, | ||
className: props.className ? className + ' ' + props.className : className | ||
@@ -21,0 +22,0 @@ })); |
{ | ||
"name": "emotion", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "high performance css-in-js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -144,2 +144,13 @@ <h1 align="center" style="color: #343a40"> | ||
} | ||
// You can also pass refs down using innerRef | ||
const H1 = styled('h1')` | ||
color: 'red'; | ||
` | ||
function Greeting ({ name }) { | ||
// will turn into to <h1 className="generated-className" ref={() => console.log('hello!')}>Hello {name}</h1> | ||
return <H1 innerRef={() => console.log('hello!')}>Hello {name}</H1> | ||
} | ||
``` | ||
@@ -146,0 +157,0 @@ |
@@ -66,3 +66,2 @@ import fs from 'fs' | ||
name: 'emotion', // not required | ||
inherits: require('babel-plugin-syntax-jsx'), | ||
visitor: { | ||
@@ -69,0 +68,0 @@ Program: { |
@@ -21,2 +21,3 @@ import React from 'react' | ||
Object.assign({}, props, { | ||
ref: props.innerRef, | ||
className: props.className | ||
@@ -23,0 +24,0 @@ ? className + ' ' + props.className |
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
69394
196