@carbon/ibm-products
Version:
Carbon for IBM Products
40 lines (36 loc) • 1.52 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
;
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');
var index = require('../../_virtual/index.js');
var cx = require('classnames');
var devtools = require('../../global/js/utils/devtools.js');
var settings = require('../../settings.js');
var react = require('@carbon/react');
// The block part of our conventional BEM class names (blockClass__E--M).
const blockClass = `${settings.pkg.prefix}--description-list__cell`;
const componentName = 'DescriptionListCell';
exports.DescriptionListCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
let {
children /* TODO: remove if not needed. */,
className,
...rest
} = _ref;
return /*#__PURE__*/React.createElement(react.StructuredListCell, _rollupPluginBabelHelpers.extends({
className: cx(blockClass, className),
ref: ref
}, devtools.getDevtoolsProps(componentName), rest), children);
});
exports.DescriptionListCell.propTypes = {
/** Provide the contents of the node */
children: index.default.node,
/** Provide an optional class to be applied to the containing node */
className: index.default.string
};
exports.DescriptionListCell = settings.pkg.checkComponentEnabled(exports.DescriptionListCell, componentName);
exports.DescriptionListCell.displayName = componentName;