storybook/addons/jest/src/register.js
2018-06-06 08:24:24 +02:00

15 lines
496 B
JavaScript

import React from 'react';
import addons from '@storybook/addons';
import PanelTitle from './components/PanelTitle';
import Panel from './components/Panel';
addons.register('storybook/tests', api => {
const channel = addons.getChannel();
addons.addPanel('storybook/tests/panel', {
title: <PanelTitle channel={addons.getChannel()} api={api} />,
// eslint-disable-next-line react/prop-types
render: ({ active }) => <Panel channel={channel} api={api} active={active} />,
});
});