UNPKG

storybook-addon-rem

Version:

A storybook addon which helps you to test how your REM sized components behave.

19 lines 537 B
import { addons, types } from '@storybook/addons'; import * as React from 'react'; import { ADDON_ID, TOOLBAR_ID } from '../constants'; import Tool from '../Tool'; addons.register(ADDON_ID, function (api) { addons.add(TOOLBAR_ID, { title: 'Rem', type: types.TOOL, match: function match(_ref) { var viewMode = _ref.viewMode; return viewMode === 'story' || viewMode === 'docs'; }, render: function render() { return /*#__PURE__*/React.createElement(Tool, { api: api }); } }); });