UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

21 lines 1.02 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderStoriesForChromatic = renderStoriesForChromatic; const react_1 = __importDefault(require("react")); function renderStoriesForChromatic(stories) { return { render: (...args) => (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(stories).map(([storyName, story]) => { var _a; return (react_1.default.createElement("div", { key: storyName }, react_1.default.createElement("h2", { className: "storyheading" }, storyName), typeof story === "function" ? story() : (_a = story.render) === null || _a === void 0 ? void 0 : _a.call(story, ...args))); }))), parameters: { chromatic: { disable: false }, }, }; } //# sourceMappingURL=renderStoriesForChromatic.js.map