"use client";
import { motion } from "motion/react";
import React from "react";
const DotLoaderMotion = () => {
const transition = (x: number) => {
return {
duration: 1,
repeat: Infinity,
repeatType: "loop" as const,
delay: x * 0.2,
ease: "easeInOut",
};
};
return (
<div className="flex items-center gap-2">
<motion.div
initial={{
y: 0,
}}
animate={{
y: [0, 10, 0],
}}
transition={transition(0) as any}
className="h-4 w-4 rounded-full border border-neutral-300 bg-gradient-to-b from-neutral-400 to-neutral-300"
/>
<motion.div
initial={{
y: 0,
}}
animate={{
y: [0, 10, 0],
}}
transition={transition(1) as any}
className="h-4 w-4 rounded-full border border-neutral-300 bg-gradient-to-b from-neutral-400 to-neutral-300"
/>
<motion.div
initial={{
y: 0,
}}
animate={{
y: [0, 10, 0],
}}
transition={transition(2)as any}
className="h-4 w-4 rounded-full border border-neutral-300 bg-gradient-to-b from-neutral-400 to-neutral-300"
/>
</div>
);
};
export default DotLoaderMotion