JSPM

babel-plugin-transform-styletron-display-name

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 407
  • Score
    100M100P100Q130836F
  • License MIT

Babel plugin to add displayName to styletron-react components

Package Exports

  • babel-plugin-transform-styletron-display-name
  • babel-plugin-transform-styletron-display-name/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-transform-styletron-display-name) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

babel-plugin-transform-styletron-display-name

Check our documentation at styletron.org.

Adds displayName to styletron-react components.

before

const Foo = styled("div", {
  color: "red"
});
const Bar = styled("div", {
  color: "red"
});

after

Foo = styled("div", {
  color: "red"
});
Foo.displayName = "Foo";
Bar = styled("div", {
  color: "red"
});
Bar.displayName = "Bar";

Install

Using npm:

npm install --save-dev babel-plugin-transform-styletron-display-name

or using yarn:

yarn add babel-plugin-transform-styletron-display-name --dev