feat: initial frontend build for RIT Freshers Hub
This commit is contained in:
28
src/components/FloatingCard/FloatingCard.tsx
Normal file
28
src/components/FloatingCard/FloatingCard.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { motion } from 'framer-motion';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
interface FloatingCardProps {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
delay?: number;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export default function FloatingCard({ children, className = '', delay = 0, style }: FloatingCardProps) {
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.85 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
transition={{ duration: 0.6, delay }}
|
||||
className={`bg-white rounded-2xl border border-[#E5E7EB] shadow-[0_8px_32px_rgba(0,0,0,0.12)] ${className}`}
|
||||
style={style}
|
||||
>
|
||||
<motion.div
|
||||
animate={{ y: [0, -8, 0] }}
|
||||
transition={{ duration: 3.5, repeat: Infinity, ease: 'easeInOut', delay }}
|
||||
>
|
||||
{children}
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user