()
| 4 | import { motion } from 'framer-motion' |
| 5 | |
| 6 | const SpiralLoader = () => { |
| 7 | const dots = 8 |
| 8 | const radius = 20 |
| 9 | |
| 10 | return ( |
| 11 | <div className="relative h-16 w-16"> |
| 12 | {[...Array(dots)].map((_, index) => { |
| 13 | const angle = (index / dots) * (2 * Math.PI) |
| 14 | const x = radius * Math.cos(angle) |
| 15 | const y = radius * Math.sin(angle) |
| 16 | |
| 17 | return ( |
| 18 | <motion.div |
| 19 | key={index} |
| 20 | className="absolute h-3 w-3 rounded-full bg-red-500" |
| 21 | style={{ |
| 22 | left: `calc(50% + ${x}px)`, |
| 23 | top: `calc(50% + ${y}px)`, |
| 24 | }} |
| 25 | animate={{ |
| 26 | scale: [0, 1, 0], |
| 27 | opacity: [0, 1, 0], |
| 28 | }} |
| 29 | transition={{ |
| 30 | duration: 1.5, |
| 31 | repeat: Infinity, |
| 32 | delay: (index / dots) * 1.5, |
| 33 | ease: 'easeInOut', |
| 34 | }} |
| 35 | /> |
| 36 | ) |
| 37 | })} |
| 38 | </div> |
| 39 | ) |
| 40 | } |
| 41 | |
| 42 | export default SpiralLoader |
nothing calls this directly
no outgoing calls
no test coverage detected