🐹
지금은 3차 프로젝트 진행 중! 지금까지는 못했지만.? 이번에는 프로젝트를 진행하면서 알게 된 점이나 진행 과정 등등을 간단히 적어보려 한다! 뭐든 적어 놓으면 좋으니까..?!
npm i react-slick
npm i slick-carousel
npm i react-slick @types/react-slick
import Slider from "react-slick";
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import React from "react";
import styled from "styled-components";
import Slider from "react-slick";
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import CardCol from "./CardCol";
function CarouselComponent() {
const settings = {
dots: true,
infinite: false,
speed: 500,
slidesToShow: 3,
slidesToScroll: 3,
};
return (
<div className="slider-container">
<Slider {...settings}>
<Box>
<CardCol barName="1번" />
</Box>
<Box>
<CardCol barName="2번" />
</Box>
<Box>
<CardCol barName="3번" />
</Box>
<Box>
<CardCol barName="4번" />
</Box>
<Box>
<CardCol barName="5번" />
</Box>
</Slider>
</div>
);
}
export default CarouselComponent;
const Box = styled.div`
width: 300px;
height: 200px;
/* background-color: red; */
`;