mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
16 lines
368 B
JavaScript
16 lines
368 B
JavaScript
import React from 'react';
|
|
import addons, { types } from '@storybook/addons';
|
|
|
|
import { ADDON_ID } from './constants';
|
|
|
|
import Tool from './Tool';
|
|
|
|
addons.register(ADDON_ID, api => {
|
|
addons.add(ADDON_ID, {
|
|
title: 'viewport / media-queries',
|
|
type: types.TOOL,
|
|
match: ({ viewMode }) => viewMode === 'story',
|
|
render: () => <Tool api={api} />,
|
|
});
|
|
});
|