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

@storybook/addon-notes

Package Overview
Dependencies
Maintainers
11
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-notes

Write notes for your Storybook stories.


Version published
Weekly downloads
42K
decreased by-4.94%
Maintainers
11
Weekly downloads
 
Created
Source

Storybook Addon Notes

Build Status on CircleCI CodeFactor Known Vulnerabilities BCH compliance codecov
Storybook Slack Backers on Open Collective Sponsors on Open Collective


Storybook Addon Notes allows you to write notes (text or HTML) for your stories in Storybook.

This addon works with Storybook for:

Storybook Addon Notes Demo

Getting Started

npm i --save-dev @storybook/addon-notes

Then create a file called addons.js in your storybook config.

Add following content to it:

import '@storybook/addon-notes/register';

Then write your stories like this:

import { storiesOf } from '@storybook/react';
import { withNotes } from '@storybook/addon-notes';

import Component from './Component';

storiesOf('Component', module)
  .add('with some emoji', withNotes('A very simple component')(() => </Component>>));
Using Markdown

To use markdown in your notes simply import a markdown file and use that in your note.

import { storiesOf } from '@storybook/react';
import { withNotes } from '@storybook/addon-notes';
import Component from './Component';
import someMarkdownText from './someMarkdownText.md';

storiesOf('Component', module)
  .add('With Markdown', withNotes(someMarkdownText)(() => <Component/>));

Deprecated API

This API is slated for removal in 4.0

import { WithNotes } from '@storybook/addon-notes';

storiesOf('Addon Notes', module)
  .add('using deprecated API', () => (
    <WithNotes notes="Hello">
      <BaseButton onClick={action('clicked')} label="😀 😎 👍 💯" />
    </WithNotes>
  ));

Keywords

FAQs

Package last updated on 19 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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