Initial commit

This commit is contained in:
Ubuntu
2026-03-01 13:23:49 +00:00
commit a8e52093aa
1485 changed files with 453467 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { useEffect } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
export function Toast({ message, onClose }) {
useEffect(() => {
if (!message) return;
const t = setTimeout(() => onClose && onClose(), 3000);
return () => clearTimeout(t);
}, [message, onClose]);
return (
<AnimatePresence>
{message && (
<motion.div
className="toast"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 20 }}
>
{message}
</motion.div>
)}
</AnimatePresence>
);
}