UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

47 lines (43 loc) 1.19 kB
/** * MSKCC 2021, 2024 */ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js'; import PropTypes from 'prop-types'; import React__default from 'react'; import cx from 'classnames'; import { usePrefix } from '../../internal/usePrefix.js'; function UnorderedList(_ref) { let { className, nested = false, isExpressive = false, ...other } = _ref; const prefix = usePrefix(); const classNames = cx(`${prefix}--list--unordered`, className, { [`${prefix}--list--nested`]: nested, [`${prefix}--list--expressive`]: isExpressive }); return /*#__PURE__*/React__default.createElement("ul", _extends({ className: classNames }, other)); } UnorderedList.propTypes = { /** * Specify a collection of ListItem's to be rendered in the UnorderedList */ children: PropTypes.node, /** * Specify an optional className to be applied to the underlying `<ul>` node */ className: PropTypes.string, /** * Specify whether this ordered list expressive or not */ isExpressive: PropTypes.bool, /** * Specify whether the list is nested, or not */ nested: PropTypes.bool }; export { UnorderedList as default };