@kadconsulting/dry
Version:
KAD Reusable Component Library
25 lines • 1.32 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
// // CLI Version 1.0.1
// Component Version 1.0.0
import { forwardRef } from 'react';
// TODO-p3: we really should replace this entirely with something either custom-made or lighter weight
import { Carousel } from 'react-responsive-carousel';
import { Image } from '../@primitives/Image';
import classnames from 'classnames';
// Styles
import 'react-responsive-carousel/lib/styles/carousel.min.css';
import './ImageCarousel.scss';
const ImageCarousel = forwardRef(({ id, images, className, imgDivClassName, ...props }, ref) => {
return (
// <div
// id={id}
// ref={ref}
// className={classnames('dry-imagecarousel', className)}
// {...props}
// >
_jsx(Carousel, { showStatus: true, showThumbs: true, infiniteLoop: true, autoPlay: false, interval: 3000, transitionTime: 500, className: classnames('carouselContainer', className), children: images?.map((image, index) => (_jsx("div", { className: classnames('carouselItem', imgDivClassName), children: _jsx(Image, { className: 'carouselItem__image', width: 'auto', id: 'carouselImage', src: image?.attributes?.url || '', alt: image?.attributes?.alternativeText || '' }) }, index))) })
// </div>
);
});
export default ImageCarousel;
//# sourceMappingURL=ImageCarousel.js.map