wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
27 lines • 844 B
JavaScript
import React from 'react';
import classnames from 'classnames';
import { node, bool } from 'prop-types';
import styles from '../CodeShowcase.scss';
var spacing = {
marginRight: '8px',
marginBottom: '8px',
marginTop: '8px',
lineHeight: '0',
display: 'flex',
};
var List = function (_a) {
var _b;
var children = _a.children, inverted = _a.inverted;
return (React.createElement("div", { className: classnames(styles.demoItems, (_b = {}, _b[styles.inverted] = inverted, _b)) }, Array.isArray(children)
? children.map(function (child, index) { return (React.createElement("div", { key: index, style: spacing }, child)); })
: children));
};
List.propTypes = {
children: node,
inverted: bool,
};
List.defaultProps = {
inverted: false,
};
export default List;
//# sourceMappingURL=List.js.map