storybook-addon-fake-api
Version:
This addon will send fake responses to the requests sent from your component
14 lines • 400 B
JavaScript
import { addons, types } from "@storybook/addons";
import { ADDON_ID, PANEL_ID } from "./models/constants";
import { APIPanel } from "./APIPanel";
addons.register(ADDON_ID, function () {
addons.add(PANEL_ID, {
type: types.PANEL,
title: "Fake API",
match: function match(_ref) {
var viewMode = _ref.viewMode;
return viewMode === "story";
},
render: APIPanel
});
});