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
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 small component',
});
See the crna-kitchen-sink app for more examples.
v5.3.26
note: only notes and knobs were updated in this release so there is no new version of storybook/react-native and instead only for those two packages.
What's Changed
- Update README.md by @wolverineks in https://github.com/storybookjs/react-native/pull/165
- [bug] Using addon-ondevice-notes crashes app on startup by @daniellyqueiroz in https://github.com/storybookjs/react-native/pull/361
- fix: v5 notes addon crash and fail to install by @dannyhw in https://github.com/storybookjs/react-native/pull/362
New Contributors
- @wolverineks made their first contribution in https://github.com/storybookjs/react-native/pull/165
- @daniellyqueiroz made their first contribution in https://github.com/storybookjs/react-native/pull/361
Full Changelog: https://github.com/storybookjs/react-native/compare/v5.3.25...v5.3.26