v1 production
This commit is contained in:
25
components/AnimatedIcon.tsx
Normal file
25
components/AnimatedIcon.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
'use client'
|
||||
|
||||
import { motion } from 'framer-motion'
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
interface AnimatedIconProps {
|
||||
children: ReactNode
|
||||
delay?: number
|
||||
}
|
||||
|
||||
export default function AnimatedIcon({ children, delay = 0 }: AnimatedIconProps) {
|
||||
return (
|
||||
<motion.div
|
||||
className="animation-icon"
|
||||
initial={{ opacity: 0, scale: 0.8 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay }}
|
||||
whileHover={{ scale: 1.1, rotate: 5 }}
|
||||
>
|
||||
{children}
|
||||
</motion.div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user