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

@storybook/addon-notes

Package Overview
Dependencies
Maintainers
8
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-notes - npm Package Compare versions

Comparing version 3.2.0-alpha.10 to 3.2.0-alpha.13

7

dist/index.js

@@ -20,6 +20,5 @@ 'use strict';

var withNotes = exports.withNotes = function withNotes(_ref) {
var notes = _ref.notes;
var withNotes = exports.withNotes = function withNotes(textOrOptions) {
var channel = _addons2.default.getChannel();
var options = typeof textOrOptions === 'string' ? { text: textOrOptions } : textOrOptions;

@@ -29,3 +28,3 @@ return function (getStory) {

// send the notes to the channel before the story is rendered
channel.emit('storybook/notes/add_notes', notes);
channel.emit('storybook/notes/add_notes', options.text);
return getStory(context);

@@ -32,0 +31,0 @@ };

{
"name": "@storybook/addon-notes",
"version": "3.2.0-alpha.10",
"version": "3.2.0-alpha.13",
"description": "Write notes for your Storybook stories.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -40,3 +40,3 @@ # Storybook Addon Notes

storiesOf('Component', module)
.add('with some emoji', withNotes({ notes: 'A very simple component'})(() => <Component></Component>));
.add('with some emoji', withNotes('A very simple component')(() => <Component></Component>));
```

@@ -5,8 +5,9 @@ import deprecate from 'util-deprecate';

export const withNotes = ({ notes }) => {
export const withNotes = textOrOptions => {
const channel = addons.getChannel();
const options = typeof textOrOptions === 'string' ? { text: textOrOptions } : textOrOptions;
return getStory => context => {
// send the notes to the channel before the story is rendered
channel.emit('storybook/notes/add_notes', notes);
channel.emit('storybook/notes/add_notes', options.text);
return getStory(context);

@@ -13,0 +14,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