Releases: sergei-zelinsky/react-critical-css
Releases · sergei-zelinsky/react-critical-css
[2.1.0] - 2018-03-19
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
Changed
withStyles
- throws an error when styles are not passed or when value's type is not stringStyleRegistry.prototype.registerStyles
- throws an error when styles are not passed or when value's type is not stringStyleRegistry.prototype.getCriticalCSS
- returns string joined with''
(empty string) instead of'\n'
(metacharacter of new line)
[1.0.0] - 2017-08-17
Initial release.
Added
- CriticalCSSProvider
- withStyles
- StyleRegistry