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

@storybook/addon-notes

Package Overview
Dependencies
Maintainers
12
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 4.0.0-alpha.1 to 4.0.0-alpha.2

8

dist/index.js

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

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _utilDeprecate = require('util-deprecate');

@@ -25,7 +29,7 @@

var withMarkdownNotes = exports.withMarkdownNotes = function withMarkdownNotes(text) {
var withMarkdownNotes = exports.withMarkdownNotes = function withMarkdownNotes(text, options) {
var channel = _addons2.default.getChannel();
return function (getStory) {
return function (context) {
_marked2.default.setOptions((0, _extends3.default)({}, _marked2.default.defaults, { options: options }));
// send the notes to the channel before the story is rendered

@@ -32,0 +36,0 @@ channel.emit('storybook/notes/add_notes', (0, _marked2.default)(text));

{
"name": "@storybook/addon-notes",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"description": "Write notes for your Storybook stories.",

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

"dependencies": {
"@storybook/addons": "4.0.0-alpha.2",
"babel-runtime": "^6.26.0",

@@ -30,9 +31,8 @@ "marked": "^0.3.19",

"devDependencies": {
"@storybook/react": "4.0.0-alpha.1",
"@types/react": "^16.1.0"
"@storybook/react": "4.0.0-alpha.2",
"@types/react": "^16.3.5"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0",
"react": "*"
}
}

@@ -6,6 +6,6 @@ import deprecate from 'util-deprecate';

export const withMarkdownNotes = text => {
export const withMarkdownNotes = (text, options) => {
const channel = addons.getChannel();
return getStory => context => {
marked.setOptions({ ...marked.defaults, options });
// send the notes to the channel before the story is rendered

@@ -12,0 +12,0 @@ channel.emit('storybook/notes/add_notes', marked(text));

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