Détail du package

babel-plugin-transform-styletron-display-name

styletron1.7kMIT1.2.0

Babel plugin to add displayName to styletron-react components

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

changelog

2.5.8

  • Update TypeScript definitions to reflect stateless functional component usage (#124) Thanks @faddee!

2.5.7

  • Added styletron-preact package
  • Use stateless functional component in styled function in styletron-react
  • Minor docs updates

2.5.6

2.5.5

  • Change prop-types package from peer to regular dependency (#118) Thanks @faddee!

2.5.4

  • Add prop-types package for React 15.5 compatibility (#116) Thanks @jbellsey!

2.5.3

2.5.2

  • Don't pass innerRef in styletron-react (#80) Thanks @faddee!
  • Improvements to TypeScript definition (#79) Thanks @faddee!

2.5.1

  • Improvements to TypeScript definition (#65) Thanks @faddee!
  • Fix READMEs on npm (Upstream registry fix when used by Lerna)

2.5.0

  • Allow styled to pass a className to regular components (#64) Thanks @faddee!

2.4.0

  • Make stylesheets optional in StyletronClient constructor (#59) Thanks @Gandem!
  • Removed leading space from class names generated from styletron-utils (#57) Thanks @mmedal!

2.3.0

  • Performance improvement via hyphenateStyleName memoization (#56)
  • Added TypeScript definitions (#52) @faddee