mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 17:01:07 +08:00
15 lines
351 B
TypeScript
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 />,
|
|
});
|
|
});
|