Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aesthetic

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aesthetic - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 2.2.4 - 04/16/18
#### 🐞 Fixed
* Updated `componentWillMount` to `componentDidMount` and `componentWillReceiveProps` to `componentDidUpdate` in preparation for React 16.3.
# 2.2.3 - 03/20/18

@@ -2,0 +6,0 @@ #### 🐞 Fixed

22

esm/style.js

@@ -76,20 +76,20 @@ import _extends from 'babel-runtime/helpers/extends';

_createClass(StyledComponent, [{
key: 'componentWillMount',
value: function componentWillMount() {
this.transformStyles(this.props);
key: 'componentDidMount',
value: function componentDidMount() {
this.transformStyles();
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.transformStyles(nextProps);
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.transformStyles();
}
}, {
key: 'getThemeName',
value: function getThemeName(props) {
return props.themeName || this.context.themeName || aesthetic.options.defaultTheme || '';
value: function getThemeName() {
return this.props.themeName || this.context.themeName || aesthetic.options.defaultTheme || '';
}
}, {
key: 'transformStyles',
value: function transformStyles(props) {
var themeName = this.getThemeName(props);
value: function transformStyles() {
var themeName = this.getThemeName();

@@ -101,3 +101,3 @@ if (this.state.firstMount || themeName !== this.state.themeName) {

firstMount: false
}, _defineProperty(_setState, stylesPropName, aesthetic.createStyleSheet(styleName, themeName, props)), _defineProperty(_setState, 'themeName', themeName), _defineProperty(_setState, themePropName, themeName ? aesthetic.getTheme(themeName) : {}), _setState));
}, _defineProperty(_setState, stylesPropName, aesthetic.createStyleSheet(styleName, themeName, this.props)), _defineProperty(_setState, 'themeName', themeName), _defineProperty(_setState, themePropName, themeName ? aesthetic.getTheme(themeName) : {}), _setState));
}

@@ -104,0 +104,0 @@ }

@@ -118,20 +118,20 @@ 'use strict';

(0, _createClass3.default)(StyledComponent, [{
key: 'componentWillMount',
value: function componentWillMount() {
this.transformStyles(this.props);
key: 'componentDidMount',
value: function componentDidMount() {
this.transformStyles();
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.transformStyles(nextProps);
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.transformStyles();
}
}, {
key: 'getThemeName',
value: function getThemeName(props) {
return props.themeName || this.context.themeName || aesthetic.options.defaultTheme || '';
value: function getThemeName() {
return this.props.themeName || this.context.themeName || aesthetic.options.defaultTheme || '';
}
}, {
key: 'transformStyles',
value: function transformStyles(props) {
var themeName = this.getThemeName(props);
value: function transformStyles() {
var themeName = this.getThemeName();

@@ -143,3 +143,3 @@ if (this.state.firstMount || themeName !== this.state.themeName) {

firstMount: false
}, (0, _defineProperty3.default)(_setState, stylesPropName, aesthetic.createStyleSheet(styleName, themeName, props)), (0, _defineProperty3.default)(_setState, 'themeName', themeName), (0, _defineProperty3.default)(_setState, themePropName, themeName ? aesthetic.getTheme(themeName) : {}), _setState));
}, (0, _defineProperty3.default)(_setState, stylesPropName, aesthetic.createStyleSheet(styleName, themeName, this.props)), (0, _defineProperty3.default)(_setState, 'themeName', themeName), (0, _defineProperty3.default)(_setState, themePropName, themeName ? aesthetic.getTheme(themeName) : {}), _setState));
}

@@ -146,0 +146,0 @@ }

{
"name": "aesthetic",
"version": "2.2.3",
"version": "2.2.4",
"description": "Aesthetic is a powerful React library for styling components through the use of adapters.",

@@ -36,4 +36,4 @@ "keywords": [

"@milesj/build-tool-config": "^0.50.0",
"react": "^16.2.0"
"react": "^16.3.2"
}
}

@@ -129,12 +129,12 @@ /**

componentWillMount() {
this.transformStyles(this.props);
componentDidMount() {
this.transformStyles();
}
componentWillReceiveProps(nextProps: StyleProps) {
this.transformStyles(nextProps);
componentDidUpdate() {
this.transformStyles();
}
getThemeName(props: StyleProps): string {
return props.themeName ||
getThemeName(): string {
return this.props.themeName ||
this.context.themeName ||

@@ -145,4 +145,4 @@ aesthetic.options.defaultTheme ||

transformStyles(props: Object) {
const themeName = this.getThemeName(props);
transformStyles() {
const themeName = this.getThemeName();

@@ -152,3 +152,3 @@ if (this.state.firstMount || themeName !== this.state.themeName) {

firstMount: false,
[stylesPropName]: aesthetic.createStyleSheet(styleName, themeName, props),
[stylesPropName]: aesthetic.createStyleSheet(styleName, themeName, this.props),
themeName,

@@ -155,0 +155,0 @@ [themePropName]: themeName ? aesthetic.getTheme(themeName) : {},

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