#20 react-netflix: slider

This commit is contained in:
haerong22
2022-09-10 19:36:32 +09:00
parent 198858f98e
commit 1130fdc0f0

View File

@@ -19,7 +19,12 @@ const Row = ({ title, id, fetchUrl, isLargeRow }) => {
<section className="row">
<h2>{title}</h2>
<div className="slider">
<div className="slider__arrow-left">
<div
className="slider__arrow-left"
onClick={() => {
document.getElementById(id).scrollLeft -= window.innerWidth - 80;
}}
>
<span className="arrow">{"<"}</span>
</div>
@@ -36,7 +41,12 @@ const Row = ({ title, id, fetchUrl, isLargeRow }) => {
))}
</div>
<div className="slider__arrow-right">
<div
className="slider__arrow-right"
onClick={() => {
document.getElementById(id).scrollLeft += window.innerWidth - 80;
}}
>
<span className="arrow">{">"}</span>
</div>
</div>