UNPKG

wix-storybook-utils

Version:

Utilities for automated component documentation within Storybook

16 lines 593 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractTabs = exports.isTab = void 0; var story_section_1 = require("../typings/story-section"); var isTab = function (_a) { var type = _a.type; return type === story_section_1.SectionType.Tab; }; exports.isTab = isTab; var extractTabs = function (section) { return section.sections.reduce(function (tabs, tabSection) { return tabs.concat((0, exports.isTab)(tabSection) ? [tabSection.title] : []); }, []); }; exports.extractTabs = extractTabs; //# sourceMappingURL=extract-tabs.js.map