wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
11 lines • 394 B
JavaScript
import { SectionType } from '../typings/story-section';
export var isTab = function (_a) {
var type = _a.type;
return type === SectionType.Tab;
};
export var extractTabs = function (section) {
return section.sections.reduce(function (tabs, tabSection) {
return tabs.concat(isTab(tabSection) ? [tabSection.title] : []);
}, []);
};
//# sourceMappingURL=extract-tabs.js.map