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

@cloudflare/style-container

Package Overview
Dependencies
Maintainers
26
Versions
506
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/style-container - npm Package Compare versions

Comparing version 1.0.12 to 1.1.0

9

CHANGELOG.md

@@ -6,4 +6,4 @@ # Change Log

<a name="1.0.12"></a>
## [1.0.12](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@1.0.11...@cloudflare/style-container@1.0.12) (2018-06-08)
<a name="1.1.0"></a>
# [1.1.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@1.0.11...@cloudflare/style-container@1.1.0) (2018-06-08)

@@ -16,4 +16,9 @@

### Features
* **style-container:** UI-850 Throw error in applyTheme ([24e1e5a](http://stash.cfops.it:7999/fe/stratus/commits/24e1e5a))
<a name="1.0.11"></a>

@@ -20,0 +25,0 @@ ## [1.0.11](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@1.0.8...@cloudflare/style-container@1.0.11) (2018-06-07)

@@ -23,2 +23,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

if (!ComponentToWrap) {
throw new InvalidComponentError(ComponentToWrap);
}
var ThemedComponent = function (_Component) {

@@ -58,2 +62,17 @@ _inherits(ThemedComponent, _Component);

export default applyTheme;
export default applyTheme;
export var InvalidComponentError = function (_Error) {
_inherits(InvalidComponentError, _Error);
function InvalidComponentError(component) {
_classCallCheck(this, InvalidComponentError);
var _this2 = _possibleConstructorReturn(this, (InvalidComponentError.__proto__ || Object.getPrototypeOf(InvalidComponentError)).call(this, 'applyTheme received an invalid first argument: ' + component));
_this2.component = component;
return _this2;
}
return InvalidComponentError;
}(Error);

@@ -6,3 +6,3 @@ 'use strict';

});
exports.getDisplayName = undefined;
exports.InvalidComponentError = exports.getDisplayName = undefined;

@@ -32,2 +32,6 @@ var _react = require('react');

const applyTheme = (ComponentToWrap, ...themes) => {
if (!ComponentToWrap) {
throw new InvalidComponentError(ComponentToWrap);
}
class ThemedComponent extends _react.Component {

@@ -54,2 +58,9 @@ render() {

exports.default = applyTheme;
exports.default = applyTheme;
class InvalidComponentError extends Error {
constructor(component) {
super(`applyTheme received an invalid first argument: ${component}`);
this.component = component;
}
}
exports.InvalidComponentError = InvalidComponentError;
{
"name": "@cloudflare/style-container",
"description": "Cloudflare Style Container",
"version": "1.0.12",
"version": "1.1.0",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "module": "es/index.js",

@@ -11,2 +11,6 @@ /* eslint-disable behance/no-deprecated */

const applyTheme = (ComponentToWrap, ...themes) => {
if (!ComponentToWrap) {
throw new InvalidComponentError(ComponentToWrap);
}
class ThemedComponent extends Component {

@@ -34,1 +38,8 @@ render() {

export default applyTheme;
export class InvalidComponentError extends Error {
constructor(component) {
super(`applyTheme received an invalid first argument: ${component}`);
this.component = component;
}
}
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