@carbon/ibm-products
Version:
Carbon for IBM Products
55 lines (48 loc) • 1.67 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');
// 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 = `${settings.pkg.prefix}--carousel__item`;
const componentName = 'CarouselItem';
/**
* TODO: A description of the component.
*/
const CarouselItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {
let {
children,
className,
...rest
} = _ref;
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
className: cx(blockClass, className)
}, devtools.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: index.default.node.isRequired,
/**
* Provide an optional class to be applied to the containing node.
*/
className: index.default.string
};
exports.CarouselItem = CarouselItem;