UNPKG

@kemuridama/storybook-addon-github

Version:

A Storybook addon that allows you to link a source code of your story on GitHub.

21 lines 616 B
import { addons, types } from "@storybook/manager-api"; import { ADDON_ID, TOOL_ID } from "./constants"; import { GitHub } from "./GitHub"; import { jsx as _jsx } from "react/jsx-runtime"; addons.register(ADDON_ID, function (api) { addons.add(TOOL_ID, { type: types.TOOL, title: "GitHub", match: function match(_ref) { var viewMode = _ref.viewMode; return !!(viewMode && viewMode.match(/^(story|docs)$/)); }, render: function render(_ref2) { var active = _ref2.active; return /*#__PURE__*/_jsx(GitHub, { active: active, api: api }); } }); });