Norbert de Langen 68c1664ec9
WIP
2018-08-11 01:40:24 +02:00

22 lines
515 B
JavaScript

import React from 'react';
import addons from '@storybook/addons';
import Panel from './components/Panel';
import { ADDON_ID, PANEL_ID } from '../shared';
const addChannel = api => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Viewport',
// eslint-disable-next-line react/prop-types
render: ({ active }) => <Panel channel={channel} api={api} active={active} />,
});
};
const init = () => {
addons.register(ADDON_ID, addChannel);
};
export { init, addChannel };