Update SKILL.md

This commit is contained in:
Jeff 2026-05-12 10:33:12 +05:30 committed by GitHub
parent 546a53dc30
commit d7db8c8c83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -366,15 +366,28 @@ export function CursorFollower() {
import { motion } from "motion/react" import { motion } from "motion/react"
export function ShimmerSkeleton({ className }: { className?: string }) { export function ShimmerSkeleton({ className }: { className?: string }) {
const controls = useAnimation()
useEffect(() => {
const run = () =>
controls.start({ x: ["-100%", "100%"], transition: { repeat: Infinity, duration: 1.2, ease: "linear" } })
const onVis = () => (document.visibilityState === "hidden" ? controls.stop() : run())
run()
document.addEventListener("visibilitychange", onVis)
return () => document.removeEventListener("visibilitychange", onVis)
}, [controls])
return ( return (
<div className={`relative overflow-hidden bg-gray-200 rounded ${className}`}> <div className={`relative overflow-hidden bg-gray-200 rounded ${className}`}>
<motion.div <motion.div
className="absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent" className="absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent"
animate={{ x: ["-100%", "100%"] }} animate={{ x: ["-100%", "100%"] }}
transition={{ repeat: Infinity, duration: 1.2, ease: "linear" }} transition={{ repeat: Infinity, duration: 1.2, ease: "linear" }}
animate={controls}
/> />
</div> </div>
) )
}
</div>
)
} }
``` ```