'use client' import { motion, useMotionValue, useSpring, useTransform } from 'framer-motion' import { useRef, ReactNode } from 'react' interface MagneticButtonProps { children: ReactNode className?: string onClick?: () => void strength?: number } export function MagneticButton({ children, className = '', onClick, strength = 0.3 }: MagneticButtonProps) { const ref = useRef(null) const x = useMotionValue(0) const y = useMotionValue(0) const springConfig = { stiffness: 300, damping: 20 } const springX = useSpring(x, springConfig) const springY = useSpring(y, springConfig) const handleMouseMove = (e: React.MouseEvent) => { if (!ref.current) return const rect = ref.current.getBoundingClientRect() const centerX = rect.left + rect.width / 2 const centerY = rect.top + rect.height / 2 const deltaX = (e.clientX - centerX) * strength const deltaY = (e.clientY - centerY) * strength x.set(deltaX) y.set(deltaY) } const handleMouseLeave = () => { x.set(0) y.set(0) } return ( {children} ) } interface SectionDividerProps { variant?: 'wave' | 'diagonal' | 'curve' fromColor?: string toColor?: string flip?: boolean } export function SectionDivider({ variant = 'wave', fromColor = 'section-bg-3', toColor = 'section-bg-4', flip = false }: SectionDividerProps) { if (variant === 'wave') { return (
) } if (variant === 'diagonal') { return (
) } if (variant === 'curve') { return (
) } return null }