forked from emre/www_projectmycelium_com
- Added scroll-to-slider functionality when clicking "Get Started" button - Modified AnimatedSection to support ref forwarding for scroll targeting - Updated HomeAurora component to accept click handler prop - Refined homepage hero text and description for clearer value proposition - Changed button from link to click handler for better user interaction
27 lines
634 B
TypeScript
27 lines
634 B
TypeScript
import { motion } from 'framer-motion'
|
|
import { forwardRef } from 'react'
|
|
|
|
type AnimatedSectionProps = {
|
|
children: React.ReactNode
|
|
id?: string
|
|
className?: string
|
|
}
|
|
|
|
export const AnimatedSection = forwardRef<HTMLElement, AnimatedSectionProps>(
|
|
({ children, id, className }, ref) => {
|
|
return (
|
|
<motion.section
|
|
ref={ref}
|
|
id={id}
|
|
className={className}
|
|
initial={{ opacity: 0, y: 40 }}
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
viewport={{ once: true, margin: '-25% 0px -20% 0px' }}
|
|
transition={{ duration: 0.5, ease: 'easeOut' }}
|
|
>
|
|
{children}
|
|
</motion.section>
|
|
)
|
|
},
|
|
)
|