Skip to content

Releases: sergei-zelinsky/react-critical-css

[2.1.0] - 2018-03-19

20 Mar 22:34
a644f78
Compare
Choose a tag to compare

Added

StyleRegistry now optionally accepts transformFn

Example:

const styleRegistry = new StyleRegistry(style => style.replace(/\s/g, ''));
   
styleRegistry.registerStyles('body { color: red; }')

console.log(styleRegistry.getCriticalCSS())  //-> body{color: red;}
// ...

Changed

Components don't throw any errors now.

[2.0.0] - 2017-08-19

19 Aug 10:46
Compare
Choose a tag to compare

Changed

  • withStyles - throws an error when styles are not passed or when value's type is not string
  • StyleRegistry.prototype.registerStyles - throws an error when styles are not passed or when value's type is not string
  • StyleRegistry.prototype.getCriticalCSS - returns string joined with '' (empty string) instead of '\n' (metacharacter of new line)

[1.0.0] - 2017-08-17

17 Aug 14:29
Compare
Choose a tag to compare

Initial release.

Added

  • CriticalCSSProvider
  • withStyles
  • StyleRegistry