Socket
Socket
Sign inDemoInstall

@kadira/react-storybook-addon-info

Package Overview
Dependencies
23
Maintainers
6
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.1 to 3.1.2

26

dist/index.js

@@ -32,19 +32,17 @@ 'use strict';

addWithInfo: function addWithInfo(storyName, info, storyFn, _options) {
if (typeof storyFn !== 'function') {
if (typeof info === 'function') {
_options = storyFn;
storyFn = info;
info = '';
} else {
throw new Error('No story defining function has been specified');
}
}
var options = (0, _extends3.default)({}, defaultOptions, _options);
this.add(storyName, function (context) {
var _info = info;
var _storyFn = storyFn;
if (typeof storyFn !== 'function') {
if (typeof info === 'function') {
_storyFn = info;
_info = '';
} else {
throw new Error('No story defining function has been specified');
}
}
var props = {
_info: _info,
info: info,
context: context,

@@ -60,3 +58,3 @@ showInline: Boolean(options.inline),

props,
_storyFn(context)
storyFn(context)
);

@@ -63,0 +61,0 @@ });

{
"name": "@kadira/react-storybook-addon-info",
"version": "3.1.1",
"version": "3.1.2",
"description": "A React Storybook addon to show additional information for your stories.",

@@ -5,0 +5,0 @@ "repository": {

@@ -13,2 +13,12 @@ import React from 'react';

addWithInfo(storyName, info, storyFn, _options) {
if (typeof storyFn !== 'function') {
if (typeof info === 'function') {
_options = storyFn;
storyFn = info;
info = '';
} else {
throw new Error('No story defining function has been specified');
}
}
const options = {

@@ -18,18 +28,6 @@ ...defaultOptions,

};
this.add(storyName, (context) => {
let _info = info;
let _storyFn = storyFn;
if (typeof storyFn !== 'function') {
if (typeof info === 'function') {
_storyFn = info;
_info = '';
} else {
throw new Error('No story defining function has been specified');
}
}
const props = {
_info,
info,
context,

@@ -44,3 +42,3 @@ showInline: Boolean(options.inline),

<Story {...props}>
{_storyFn(context)}
{storyFn(context)}
</Story>

@@ -47,0 +45,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc