UNPKG

@storybook/addon-links

Version:

Link stories together to build demos and prototypes with your UI components

12 lines 310 B
import { addons } from '@storybook/addons'; import EVENTS, { ADDON_ID } from './constants'; addons.register(ADDON_ID, api => { const channel = addons.getChannel(); channel.on(EVENTS.REQUEST, ({ kind, name }) => { const id = api.storyId(kind, name); api.emit(EVENTS.RECEIVE, id); }); });