storybook-addon-markuplint-proto
Version:
Prototype of unofficial markuplint Storybook addon
12 lines • 454 B
JavaScript
import React from "react";
import { useParameter } from "@storybook/api";
import { PARAM_KEY } from "./constants";
import { TabContent } from "./components/TabContent";
export var Tab = function Tab(_ref) {
var active = _ref.active;
// https://storybook.js.org/docs/react/addons/addons-api#useparameter
var paramData = useParameter(PARAM_KEY, "");
return active ? /*#__PURE__*/React.createElement(TabContent, {
code: paramData
}) : null;
};