[React] framer-motion으로 슬라이더 만들기
import styled from "styled-components"; import { motion, AnimatePresence } from "framer-motion"; import { useEffect, useRef, useState } from "react"; const box = { entry: (isBack: boolean) => ({ x: isBack ? -500 : 500, opacity: 0, scale: 0, }), center: { x: 0, opacity: 1, scale: 1, transition: { duration: 0.3, }, }, exit: (isBack: boolean) => ({ x: isBack ? 500 : -500, opacity: 0, scale: 0, tran..