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