UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

54 lines (50 loc) 1.42 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 OrderedList(_ref) { let { className, nested = false, native = false, isExpressive = false, ...other } = _ref; const prefix = usePrefix(); const classNames = cx({ [`${prefix}--list--ordered`]: !native, [`${prefix}--list--ordered--native`]: native, [`${prefix}--list--nested`]: nested, [`${prefix}--list--expressive`]: isExpressive }, className); return /*#__PURE__*/React__default.createElement("ol", _extends({ className: classNames }, other)); } OrderedList.propTypes = { /** * Provide list items to be rendered in the ordered list */ children: PropTypes.node, /** * Provide an optional className to be applied to the containing <ol> node */ className: PropTypes.string, /** * Specify whether this ordered list expressive or not */ isExpressive: PropTypes.bool, /** * Specify whether this ordered list should use native list styles instead of custom counter */ native: PropTypes.bool, /** * Specify whether this ordered list is nested inside of another nested list */ nested: PropTypes.bool }; export { OrderedList as default };