I am using centerMode: true
and adding a background-color
for inactive images. I need is a movement on the click of the previous/next inactive image so that the carousel should move accordingly.
const settings = {
dots: false,
slidesToShow: 1,
autoplay: false,
centerMode: true,
variableWidth: true,
nextArrow: <NextArrow />,
prevArrow: <PreviousArrow />,
};
const NextArrow = ({ onClick }) => (
<span className="next" onClick={onClick}></span>
);
const PreviousArrow = ({ onClick }) => (
<span className="prev" onClick={onClick}></span>
);
Currently, the navigation is only on the arrows and not on the previous/next image click.
EDIT - there is native click event binded on the images.