UNPKG

@carbon/ibm-products

Version:

Carbon for IBM Products

53 lines (47 loc) 1.62 kB
/** * 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. */ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js'; import React__default from 'react'; import PropTypes from '../../_virtual/index.js'; import cx from 'classnames'; import { getDevtoolsProps } from '../../global/js/utils/devtools.js'; import { pkg } from '../../settings.js'; // Carbon and package components we use. /* TODO: @import(s) of carbon components and other package components. */ // The block part of our conventional BEM class names (blockClass__E--M). const blockClass = `${pkg.prefix}--carousel__item`; const componentName = 'CarouselItem'; /** * TODO: A description of the component. */ const CarouselItem = /*#__PURE__*/React__default.forwardRef((_ref, ref) => { let { children, className, ...rest } = _ref; return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, { className: cx(blockClass, className) }, getDevtoolsProps(componentName), { ref: ref }), children); }); CarouselItem.displayName = componentName; // The types and DocGen commentary for the component props, // in alphabetical order (for consistency). // See https://www.npmjs.com/package/prop-types#usage. CarouselItem.propTypes = { /** * Provide the contents of the CarouselItem. */ children: PropTypes.node.isRequired, /** * Provide an optional class to be applied to the containing node. */ className: PropTypes.string }; export { CarouselItem };