fbredius/storybook

View on GitHub
addons/measure/src/register.tsx

Summary

Maintainability
A
0 mins
Test Coverage
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 />,
  });
});