UNPKG

398 BJavaScriptView Raw
1import "core-js/modules/es.function.name.js";
2import { addons } from '@storybook/addons';
3import EVENTS, { ADDON_ID } from './constants';
4addons.register(ADDON_ID, function (api) {
5 var channel = addons.getChannel();
6 channel.on(EVENTS.REQUEST, function (_ref) {
7 var kind = _ref.kind,
8 name = _ref.name;
9 var id = api.storyId(kind, name);
10 api.emit(EVENTS.RECEIVE, id);
11 });
12});
\No newline at end of file