@@ -2,7 +2,7 @@ import { useState } from "react";
22import { PiPawPrintFill , PiShoppingCartFill } from "react-icons/pi" ;
33import { HiX , HiChevronLeft , HiChevronRight } from "react-icons/hi" ;
44import { FaCheck } from "react-icons/fa" ;
5- import { AnimatePresence , motion } from "motion/react" ;
5+ import { AnimatePresence , motion , cubicBezier } from "motion/react" ;
66import "./IslandMenu.scss" ;
77import chickenThumbnail from "/src/assets/thumbnails/chicken.png" ;
88import foxThumbnail from "/src/assets/thumbnails/fox.png" ;
@@ -28,20 +28,20 @@ const containerVariants = {
2828
2929const menuVariants = {
3030 initial : { opacity : 0 } ,
31- animate : { opacity : 1 , transition : { duration : 0.3 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
32- exit : { opacity : 0 , transition : { duration : 0.3 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
31+ animate : { opacity : 1 , transition : { duration : 0.3 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
32+ exit : { opacity : 0 , transition : { duration : 0.3 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
3333} ;
3434
3535const islandMenuButtonVariants = {
3636 initial : { opacity : 0 , scale : 0 } ,
37- animate : { opacity : 1 , scale : 1 , transition : { duration : 0.3 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
38- exit : { opacity : 0 , scale : 0 , transition : { duration : 0.3 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
37+ animate : { opacity : 1 , scale : 1 , transition : { duration : 0.3 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
38+ exit : { opacity : 0 , scale : 0 , transition : { duration : 0.3 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
3939} ;
4040
4141const islandMenuOverlayVariants = {
4242 initial : { y : 500 , x : "-50%" } ,
43- animate : { y : 0 , x : "-50%" , transition : { staggerChildren : 0.2 , delay : 0.1 , duration : 0.3 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
44- exit : { y : 500 , x : "-50%" , transition : { duration : 0.3 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
43+ animate : { y : 0 , x : "-50%" , transition : { staggerChildren : 0.2 , delay : 0.1 , duration : 0.3 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
44+ exit : { y : 500 , x : "-50%" , transition : { duration : 0.3 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
4545} ;
4646
4747export const itemListVariants = {
@@ -52,8 +52,8 @@ export const itemListVariants = {
5252
5353export const itemVariants = {
5454 initial : { opacity : 0 , y : 5 } ,
55- animate : { opacity : 1 , y : 0 , transition : { duration : 1 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
56- exit : { opacity : 0 , y : - 5 , transition : { duration : 1 , ease : [ 0.14 , 0.8 , 0.4 , 1 ] } } ,
55+ animate : { opacity : 1 , y : 0 , transition : { duration : 1 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
56+ exit : { opacity : 0 , y : - 5 , transition : { duration : 1 , ease : cubicBezier ( 0.14 , 0.8 , 0.4 , 1 ) } } ,
5757} ;
5858
5959const IslandMenu = ( ) => {
0 commit comments