Write notes for your react-native Storybook stories.

View on GithubNew to Storybook?Get started

Storybook Notes Addon for react-native

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

Installation

yarn add -D @storybook/addon-ondevice-notes

Configuration

Then, add following content to .rnstorybook/main.ts:

import type { StorybookConfig } from '@storybook/react-native';

const main: StorybookConfig = {
  deviceAddons: ['@storybook/addon-ondevice-notes'],
};

export default main;

Usage

Use the notes parameter to add a note to stories:

import type { Meta } from '@storybook/react';
import { MyComponent } from './MyComponent';

const meta = {
  title: 'My title',
  component: MyComponent,
  parameters: {
    notes: `
     # Here I can add some markdown
     
     Put a full new line between each element.
    `,
  },
} satisfies Meta<typeof MyComponent>;

export default meta;

See the example app for more examples.

Made by
  • ndelangen
    ndelangen
  • shilman
    shilman
  • tmeasday
    tmeasday
  • ghengeveld
    ghengeveld
  • winkervsbecks
    winkervsbecks
  • yannbf
    yannbf
Tags