Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emotion

Package Overview
Dependencies
Maintainers
2
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emotion - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

1

lib/babel.js

@@ -11,3 +11,2 @@ 'use strict';

name: 'emotion', // not required
inherits: require('babel-plugin-syntax-jsx'),
visitor: {

@@ -14,0 +13,0 @@ Program: {

1

lib/styled.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc