'use client'; import { motion, useMotionValue, useTransform, useSpring } from 'framer-motion'; import { useRef, ReactNode } from 'react'; interface TiltCardProps { children: ReactNode; className?: string; tiltAmount?: number; glareEnable?: boolean; glareMaxOpacity?: number; } export function TiltCard({ children, className = '', tiltAmount = 10, glareEnable = true, glareMaxOpacity = 0.15, }: TiltCardProps) { const ref = useRef(null); const x = useMotionValue(0.5); const y = useMotionValue(0.5); const rotateX = useSpring(useTransform(y, [0, 1], [tiltAmount, -tiltAmount]), { stiffness: 300, damping: 30, }); const rotateY = useSpring(useTransform(x, [0, 1], [-tiltAmount, tiltAmount]), { stiffness: 300, damping: 30, }); const handleMouseMove = (e: React.MouseEvent) => { if (!ref.current) return; const rect = ref.current.getBoundingClientRect(); x.set((e.clientX - rect.left) / rect.width); y.set((e.clientY - rect.top) / rect.height); }; const handleMouseLeave = () => { x.set(0.5); y.set(0.5); }; return ( {children} {glareEnable && (
)} ); } interface PressableButtonProps { children: ReactNode; className?: string; onClick?: () => void; variant?: 'primary' | 'secondary' | 'ghost'; } export function PressableButton({ children, className = '', onClick, variant = 'primary', }: PressableButtonProps) { const baseStyles = { primary: 'bg-gradient-to-r from-[#C41E3A] to-[#99182d] text-white shadow-lg shadow-red-500/25 hover:shadow-xl hover:shadow-red-500/40', secondary: 'bg-white text-gray-700 border-2 border-gray-200 hover:border-gray-300 shadow-md hover:shadow-lg', ghost: 'bg-transparent text-[#C41E3A] hover:bg-red-50', }; return ( {children} ); } interface InkGlowCardProps { children: ReactNode; className?: string; active?: boolean; } export function InkGlowCard({ children, className = '', active = false }: InkGlowCardProps) { return ( {active && (
)}
{children}
); }