Comparing version 0.5.1 to 0.5.2
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.ThemeProvider = exports.ClassNameAdapter = exports.Adapter = exports.classes = exports.createStyler = exports.StylesPropType = exports.ClassNamesPropType = undefined; | ||
exports.ThemeProvider = exports.ClassNameAdapter = exports.Adapter = exports.classes = exports.createStyler = exports.ClassOrStylesPropType = exports.StylesPropType = exports.ClassNamesPropType = undefined; | ||
@@ -31,5 +31,5 @@ var _react = require('react'); | ||
var _classNames = require('./classNames'); | ||
var _classes = require('./classes'); | ||
var _classNames2 = _interopRequireDefault(_classNames); | ||
var _classes2 = _interopRequireDefault(_classes); | ||
@@ -40,5 +40,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var StylesPropType = exports.StylesPropType = _react.PropTypes.objectOf(_react.PropTypes.object); | ||
var ClassOrStylesPropType = exports.ClassOrStylesPropType = _react.PropTypes.oneOfType([ClassNamesPropType, StylesPropType]); | ||
exports.createStyler = _createStyler2.default; | ||
exports.classes = _classNames2.default; | ||
exports.classes = _classes2.default; | ||
exports.Adapter = _Adapter2.default; | ||
@@ -45,0 +46,0 @@ exports.ClassNameAdapter = _ClassNameAdapter2.default; |
{ | ||
"name": "aesthetic", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Abstract library to support a range of styling options for React components.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,2 +0,2 @@ | ||
# Aesthetic v0.4.0 | ||
# Aesthetic v0.5.2 | ||
[![Build Status](https://travis-ci.org/milesj/aesthetic.svg?branch=master)](https://travis-ci.org/milesj/aesthetic) | ||
@@ -3,0 +3,0 @@ |
@@ -35,2 +35,4 @@ 'use strict'; | ||
var instanceID = 0; | ||
function style(aesthetic) { | ||
@@ -41,5 +43,7 @@ var styles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
return function wrapStyles(Component) { | ||
var styleName = options.styleName || Component.displayName || Component.name; | ||
var styleName = options.styleName || Component.displayName; | ||
if (process.env.NODE_ENV === 'development') { | ||
styleName = styleName || Component.name; | ||
if (!(aesthetic instanceof _Aesthetic2.default)) { | ||
@@ -52,2 +56,5 @@ throw new Error('An instance of `Aesthetic` is required.'); | ||
} | ||
} else { | ||
instanceID += 1; | ||
styleName = styleName || '' + Math.random().toString(32).substr(2) + instanceID; | ||
} | ||
@@ -54,0 +61,0 @@ |
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
54522
655