Socket
Socket
Sign inDemoInstall

react-emotion

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-emotion - npm Package Compare versions

Comparing version 10.0.0-really-unsafe-please-do-not-use.2 to 10.0.0

index.js

51

package.json
{
"name": "react-emotion",
"version": "10.0.0-really-unsafe-please-do-not-use.2",
"description": "The Next Generation of CSS-in-JS, for React projects.",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "types/index.d.ts",
"files": [
"src",
"dist",
"macro.js",
"types"
],
"dependencies": {
"@emotion/styled-base": "^10.0.0-really-unsafe-please-do-not-use.2",
"babel-plugin-emotion": "^10.0.0-really-unsafe-please-do-not-use.2"
},
"peerDependencies": {
"react": "15.x || 16.x"
},
"devDependencies": {
"@types/react": "16.0.16",
"dtslint": "^0.3.0",
"emotion": "^10.0.0-really-unsafe-please-do-not-use.2"
},
"author": "Kye Hohenberger",
"homepage": "https://emotion.sh",
"license": "MIT",
"repository": "https://github.com/emotion-js/emotion/tree/master/packages/react-emotion",
"keywords": [
"styles",
"emotion",
"react",
"css",
"css-in-js"
],
"bugs": {
"url": "https://github.com/emotion-js/emotion/issues"
},
"umd:main": "./dist/emotion.umd.min.js",
"publishConfig": {
"tag": "next"
},
"browser": {
"./dist/index.cjs.js": "./dist/index.browser.cjs.js",
"./dist/index.esm.js": "./dist/index.browser.esm.js"
},
"gitHead": "0da0de50f6f2c19e46bca7662d1a954d48db1264"
"version": "10.0.0",
"description": "This package is not relevant in Emotion 10, please use @emotion/styled",
"main": "index.js",
"repository": "https://github.com/emotion-js/react-emotion-redirect",
"license": "MIT"
}
# react-emotion
> The styled API for emotion and react
The package "react-emotion" has been replaced by "@emotion/styled" in version 10. See https://emotion.sh/docs/migrating-to-emotion-10 for more information on migrating.
`react-emotion` exports `styled` which allows you to use emotion to create React components that have styles attached to them, it also exports all of `emotion`'s exports.
For more documentation on `styled`, [read about it and try it out in the `styled` docs](https://emotion.sh/docs/styled)
```bash
npm install --save emotion react-emotion
```
```jsx
// @live
import styled, { css } from 'react-emotion'
const SomeComponent = styled('div')`
display: flex;
background-color: ${props => props.color};
`
const AnotherComponent = styled('h1')(
{
color: 'hotpink'
},
props => ({ flex: props.flex })
)
render(
<SomeComponent color="#DA70D6">
<AnotherComponent flex={1}>Some text.</AnotherComponent>
</SomeComponent>
)
```
This package exists to redirect people to the @emotion/styled package and the Emotion docs

Sorry, the diff of this file is not supported yet

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