UNPKG

storybook-addon-styled-component-theme

Version:

storybook addon with styled-components theme

25 lines 930 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var addons_1 = require("@storybook/addons"); var React = require("react"); var Themes_1 = require("./Themes"); addons_1.default.register("storybook/themes", function (api) { // Also need to set a unique name to the panel. addons_1.default.addPanel("storybook/themes/panel", { title: "Themes", type: addons_1.types.PANEL, render: function (_a) { var active = _a.active; return (React.createElement(Themes_1.Themes, { key: "storybook-theme-addon", channel: addons_1.default.getChannel(), api: api, active: active })); }, }); }); exports.default = addons_1.makeDecorator({ name: "withThemesProvider", parameterName: "theme", wrapper: function (getStory, context) { console.log("hello"); return getStory(context); }, }); //# sourceMappingURL=register.js.map