import React from "react";
import { motion } from "framer-motion";
const Penalty = () => {
const arr = ["사과", "배", "포도", "망고", "수박", "귤", "딸기", "바나나"];
const variants = {
visible: { opacity: 0.7, y: 0 },
hidden: { opacity: 0, y: 50 },
};
return (
<div>
{arr.map((item, index) => (
<motion.div
key={index}
initial="hidden"
animate="visible"
variants={variants}
transition={{ duration: 0.2, ease: "easeInOut", delay: 0.2 * index }}
>
<div style={{ textAlign: "center", fontSize: "40px" }}>{item}</div>
</motion.div>
))}
</div>
);
};
export default Penalty;
'프론트엔드 > React' 카테고리의 다른 글
[React] .env 파일 환경변수 만들기 (0) | 2023.12.09 |
---|---|
[React] index.html에 추가한 SDK 스크립트를 다른 파일 또는 다른 컴포넌트에서 사용하는 방법 (0) | 2023.12.09 |
[REACT] 리액트 깃허브 페이지 커스텀 도메인(가비아) (0) | 2023.11.14 |
[REACT] 리액트 깃허브 페이지 커스텀 도메인 빈화면 오류 (0) | 2023.11.13 |
[REACT] 파일 제출 버튼 스타일링(input type="file") with 스타일드 컴포넌트 (0) | 2023.11.07 |