next.js/examples/with-cloudinary/utils/animationVariants.ts
animationVariants.ts19 lines303 B
export const variants = {
  enter: (direction: number) => {
    return {
      x: direction > 0 ? 1000 : -1000,
      opacity: 0,
    };
  },
  center: {
    x: 0,
    opacity: 1,
  },
  exit: (direction: number) => {
    return {
      x: direction < 0 ? 1000 : -1000,
      opacity: 0,
    };
  },
};
Quest for Codev2.0.0
/
SIGN IN