Comparing version 0.6.2 to 1.0.0
{ | ||
"name": "aesthetic", | ||
"version": "0.6.2", | ||
"version": "1.0.0", | ||
"description": "Abstract library to support a range of styling options for React components.", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
"dependencies": { | ||
"aesthetic-utils": "^0.4.3", | ||
"aesthetic-utils": "^1.0.0", | ||
"hoist-non-react-statics": "^1.2.0", | ||
@@ -20,0 +20,0 @@ "lodash.merge": "^4.6.0" |
@@ -1,2 +0,2 @@ | ||
# Aesthetic v0.5.2 | ||
# Aesthetic v1.0.0 | ||
[![Build Status](https://travis-ci.org/milesj/aesthetic.svg?branch=master)](https://travis-ci.org/milesj/aesthetic) | ||
@@ -213,2 +213,4 @@ | ||
Defaults to `theme`. | ||
* `pure` (boolean) - When true, the higher-order-component will extend `React.PureComponent` | ||
instead of `React.Component`. Only use this for static/dumb components. | ||
@@ -221,2 +223,3 @@ ```javascript | ||
extendable: true, | ||
pure: true, | ||
stylesPropName: 'classes', | ||
@@ -414,3 +417,3 @@ themePropName: 'appTheme', | ||
```javascript | ||
style(function (theme, prevStyles) { | ||
style((theme, prevStyles) => { | ||
// ... | ||
@@ -417,0 +420,0 @@ })(Button) |
15
style.js
@@ -64,3 +64,3 @@ 'use strict'; | ||
// Function name isn't always available when minified, | ||
// Function/constructor name aren't always available when code is minified, | ||
// so only use it in development. | ||
@@ -93,10 +93,13 @@ if (process.env.NODE_ENV === 'development') { | ||
extendable = _options$extendable === undefined ? aesthetic.options.extendable : _options$extendable, | ||
extendFrom = options.extendFrom; | ||
extendFrom = options.extendFrom, | ||
_options$pure = options.pure, | ||
pure = _options$pure === undefined ? false : _options$pure; | ||
var ParentComponent = pure && _react2.default.PureComponent ? _react2.default.PureComponent : _react2.default.Component; | ||
// Set base styles | ||
aesthetic.setStyles(styleName, styles, extendFrom); | ||
var StyledComponent = function (_React$Component) { | ||
_inherits(StyledComponent, _React$Component); | ||
var StyledComponent = function (_ParentComponent) { | ||
_inherits(StyledComponent, _ParentComponent); | ||
@@ -167,3 +170,3 @@ function StyledComponent() { | ||
return StyledComponent; | ||
}(_react2.default.Component); | ||
}(ParentComponent); | ||
@@ -170,0 +173,0 @@ StyledComponent.displayName = 'Aesthetic(' + styleName + ')'; |
@@ -21,3 +21,3 @@ "use strict"; | ||
/*:: export type StyleDeclarationOrCallback = StyleDeclarationMap | StyleCallback;*/ | ||
/*:: export type MaybeClassName = string | number | { [key: string]: boolean } | MaybeClassName[];*/ | ||
/*:: export type MaybeClassName = PrimitiveType | { [key: string]: boolean } | MaybeClassName[];*/ | ||
/*:: export type ClassNameMap = { [setName: string]: string };*/ | ||
@@ -30,2 +30,3 @@ /*:: export type TransformedStylesMap = StyleDeclarationMap | ClassNameMap;*/ | ||
extendFrom?: string, | ||
pure?: boolean, | ||
styleName?: string, | ||
@@ -32,0 +33,0 @@ stylesPropName?: string, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
74339
859
1
715
+ Addedaesthetic-utils@1.6.2(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
- Removedaesthetic-utils@0.4.3(transitive)
Updatedaesthetic-utils@^1.0.0