This commit is contained in:
2025-09-18 20:21:48 +02:00
parent f5ab743987
commit cde6c90033
8 changed files with 193 additions and 192 deletions

24
src/components/FadeIn.tsx Normal file
View File

@@ -0,0 +1,24 @@
'use client'
import { motion, Transition } from 'framer-motion'
import React from 'react'
type FadeInProps = {
children: React.ReactNode
transition?: Transition
className?: string
}
export function FadeIn({ children, transition, className }: FadeInProps) {
return (
<motion.div
className={className}
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: false, margin: '0px 0px -100px 0px' }}
transition={transition || { duration: 0.5 }}
>
{children}
</motion.div>
)
}