redux-devtools/packages/devui/.storybook/themeAddon/register.js

14 lines
368 B
JavaScript
Raw Normal View History

2019-01-03 16:00:55 +03:00
import React from 'react';
import addons from '@storybook/addons';
import Panel from './Panel';
import { ADDON_ID, PANEL_ID } from './constant';
addons.register(ADDON_ID, api => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Theme',
2019-01-10 21:51:14 +03:00
render: ({ active }) =>
active ? <Panel channel={channel} api={api} /> : null
2019-01-03 16:00:55 +03:00
});
});