UNPKG

398 BJavaScriptView Raw
1import { addons, types } from '@storybook/addons';
2import { ADDON_ID, PANEL_ID } from './shared';
3addons.register(ADDON_ID, () => {
4 addons.add(PANEL_ID, {
5 type: types.TAB,
6 title: 'Docs',
7 route: ({
8 storyId,
9 refId
10 }) => refId ? `/docs/${refId}_${storyId}` : `/docs/${storyId}`,
11 match: ({
12 viewMode
13 }) => viewMode === 'docs',
14 render: () => null
15 });
16});
\No newline at end of file