There is a component:
const HorizontalScroller = (props) => {
return (
<div className={'scroller scroller_horizontal'}>
<div className='scroller_horizontal_child'>
<div className="card" style={{width: '232px', height: '373px', margin: '0 20px', border: '1px solid red'}}>
Card
</div>
<div className="card" style={{width: '232px', height: '373px', margin: '0 20px', border: '1px solid red'}}>
Card
</div>
<div className="card" style={{width: '232px', height: '373px', margin: '0 20px', border: '1px solid red'}}>
Card
</div>
<div className="card" style={{width: '232px', height: '373px', margin: '0 20px', border: '1px solid red'}}>
Card
</div>
<div className="card" style={{width: '232px', height: '373px', margin: '0 20px', border: '1px solid red'}}>
Card
</div>
</div>
<div className="scroller_horizontal_point scroller_horizontal_point_right"/>
<div className="scroller_horizontal_point scroller_horizontal_point_left"/>
</div>
);
};
The number of cards is arbitrary
How to make it so that when you click on the right point, the cards shift to the left. Similarly with the other point. And this should happen endlessly It is advisable to use the transform property
Here is a picture of what should happen when you click on the right point.
I tried to move the elements in the DOM, but the onclick method on the card did not work