UNPKG

storybook-addon-markuplint-proto

Version:
20 lines (18 loc) 575 B
import { addons, types } from "@storybook/addons"; import { ADDON_ID, EVENTS, PANEL_ID } from "../constants"; import { Panel } from "../Panel"; import { callVerify } from "../verify"; // Register the addon addons.register(ADDON_ID, function (api) { api.on(EVENTS.PARAMETERS_SET, function (args) { return callVerify(api, args); }); // Register the panel addons.add(PANEL_ID, { type: types.PANEL, title: "markuplint", match: function match(_ref) { var viewMode = _ref.viewMode; return viewMode === "story"; }, render: Panel }); });