Skip to content
Discussion options

You must be logged in to vote

Theres not yet good documentation on how to add addons but you can check this as an example

https://github.com/storybookjs/react-native/blob/next/packages/ondevice-notes/src/register.tsx

You basically need a /register file that loads your addon

addons.register('storybook/notes', (api: RNAddonApi) => {
  addons.add('storybook/notes/panel', {
    type: types.PANEL,
    title: 'Notes',
    render: ({ active }) => <Notes api={api} active={active} />,
    paramKey: PARAM_KEY,
  });
});

Its not necessary to publish the addon you can also just have a folder locally that you load as an addon as long as it has the register file in there

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Vanish404
Comment options

@dannyhw
Comment options

Answer selected by Vanish404
@Vanish404
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants