26 lines
672 B
TypeScript
26 lines
672 B
TypeScript
"use client";
|
|
|
|
import { motion } from "motion/react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
interface MagicCardProps {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export function MagicCard({ children, className }: MagicCardProps) {
|
|
return (
|
|
<motion.div
|
|
className={cn(
|
|
"relative overflow-hidden rounded-lg border border-white/20 bg-white/5 backdrop-blur-sm",
|
|
className,
|
|
)}
|
|
whileHover={{ scale: 1.02 }}
|
|
transition={{ duration: 0.2 }}
|
|
>
|
|
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full animate-shimmer" />
|
|
{children}
|
|
</motion.div>
|
|
);
|
|
}
|