UNPKG

chayns-components

Version:

A set of beautiful React components for developing chayns® applications.

46 lines (43 loc) 1.08 kB
/** * @component */ import PropTypes from 'prop-types'; import React from 'react'; import AbstractList from './AbstractList'; import ExpandableList from './ExpandableList/ExpandableList'; import "./List.css"; /** * The wrapper for the `ListItem`-component to create lists. */ const List = _ref => { let { className, children, notExpandable = false } = _ref; if (notExpandable) { return /*#__PURE__*/React.createElement(AbstractList, { className: className }, children); } return /*#__PURE__*/React.createElement(ExpandableList, { className: className }, children); }; List.propTypes = { /** * A classname string that will be applied to the wrapper container. */ className: PropTypes.string, /** * The children of the list. */ children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]), /** * Wether the components inside of the list should not be expandable. */ notExpandable: PropTypes.bool }; List.displayName = 'List'; export default List; //# sourceMappingURL=List.js.map