storybook/addons/measure/src/manager.tsx
2022-03-18 10:27:04 +01:00

15 lines
351 B
TypeScript

import React from 'react';
import { addons, types } from '@storybook/addons';
import { ADDON_ID, TOOL_ID } from './constants';
import { Tool } from './Tool';
addons.register(ADDON_ID, () => {
addons.add(TOOL_ID, {
type: types.TOOL,
title: 'Measure',
match: ({ viewMode }) => viewMode === 'story',
render: () => <Tool />,
});
});