UNPKG

wix-storybook-utils

Version:

Utilities for automated component documentation within Storybook

19 lines 1.02 kB
import React from 'react'; import { linkTo } from '@storybook/addon-links'; import Text from '../Text'; import TextButton from '../TextButton'; import { classes } from './IncludedComponents.st.css'; var IncludedComponents = function (_a) { var includedComponents = _a.includedComponents; return (React.createElement("div", { className: classes.root }, includedComponents.map(function (componentItem, id) { var category = componentItem.category, title = componentItem.title, optional = componentItem.optional; return (React.createElement("div", { key: "item-".concat(id), className: classes.item }, React.createElement(TextButton, { onClick: linkTo(category, title) }, "<".concat(title, "/>")), optional && (React.createElement(Text, { size: "small", weight: "thin", light: true, secondary: true }, "Optional")))); }))); }; IncludedComponents.defaultProps = { includedComponents: [], }; export default IncludedComponents; //# sourceMappingURL=IncludedComponents.js.map