Socket
Socket
Sign inDemoInstall

@storybook/addons

Package Overview
Dependencies
Maintainers
10
Versions
1495
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addons - npm Package Compare versions

Comparing version 4.0.0-alpha.10 to 4.0.0-alpha.11

22

dist/index.js

@@ -12,2 +12,6 @@ 'use strict';

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

@@ -34,2 +38,4 @@

var _components = require('@storybook/components');
var _storybookChannelMock = require('./storybook-channel-mock');

@@ -41,4 +47,3 @@

// Resolves to window in browser and to global in node
exports.mockChannel = _storybookChannelMock2.default;
exports.mockChannel = _storybookChannelMock2.default; // Resolves to window in browser and to global in node

@@ -103,3 +108,14 @@ var AddonStore = exports.AddonStore = function () {

value: function addPanel(name, panel) {
this.panels[name] = panel;
// supporting legacy addons, which have not migrated to the active-prop
var original = panel.render;
if (original && original.toString() && !original.toString().match(/active/)) {
this.panels[name] = (0, _extends3.default)({}, panel, {
render: function render(_ref) {
var active = _ref.active;
return (0, _components.TabWrapper)({ active: active, render: original });
}
});
} else {
this.panels[name] = panel;
}
}

@@ -106,0 +122,0 @@ }, {

5

package.json
{
"name": "@storybook/addons",
"version": "4.0.0-alpha.10",
"version": "4.0.0-alpha.11",
"description": "Storybook addons store",

@@ -23,3 +23,4 @@ "keywords": [

"dependencies": {
"@storybook/channels": "4.0.0-alpha.10",
"@storybook/channels": "4.0.0-alpha.11",
"@storybook/components": "4.0.0-alpha.11",
"global": "^4.3.2",

@@ -26,0 +27,0 @@ "util-deprecate": "^1.0.2"

// Resolves to window in browser and to global in node
import global from 'global';
import { TabWrapper } from '@storybook/components';

@@ -55,3 +56,12 @@ export mockChannel from './storybook-channel-mock';

addPanel(name, panel) {
this.panels[name] = panel;
// supporting legacy addons, which have not migrated to the active-prop
const original = panel.render;
if (original && original.toString() && !original.toString().match(/active/)) {
this.panels[name] = {
...panel,
render: ({ active }) => TabWrapper({ active, render: original }),
};
} else {
this.panels[name] = panel;
}
}

@@ -58,0 +68,0 @@

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