storybook/addons/ondevice-notes
2019-07-09 02:35:11 +08:00
..
2018-10-12 12:11:52 +03:00
2019-07-09 02:35:11 +08:00
2019-04-04 21:14:23 -04:00

Storybook Notes Addon for react-native

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

Storybook Addon Notes Demo

Installation

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

Configuration

Create a file called rn-addons.js in your storybook config.

Add following content to it:

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

Then import rn-addons.js next to your getStorybookUI call.

import './rn-addons';

Usage

Use the notes parameter to add a note to stories:

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

import Component from './Component';

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

See the crna-kitchen-sink app for more examples.