chore: Application du linter

This commit is contained in:
Luc SORIGNET
2025-05-12 10:34:47 +02:00
parent 23a593dbc7
commit 425e6d73e5
56 changed files with 1140 additions and 1469 deletions

View File

@ -22,6 +22,7 @@ const typeStyles = {
};
export default function FlashNotification({
displayPeriod = 3000,
title,
message,
type = 'info',
@ -33,9 +34,9 @@ export default function FlashNotification({
const timer = setTimeout(() => {
setIsVisible(false); // Déclenche la disparition
setTimeout(onClose, 300); // Appelle onClose après l'animation
}, 3000); // Notification visible pendant 3 secondes
}, displayPeriod); // Notification visible pendant 3 secondes par défaut
return () => clearTimeout(timer);
}, [onClose]);
}, [onClose, displayPeriod]);
if (!message || !isVisible) return null;
@ -47,14 +48,14 @@ export default function FlashNotification({
animate={{ opacity: 1, x: 0 }} // Animation visible
exit={{ opacity: 0, x: 50 }} // Animation de sortie
transition={{ duration: 0.3 }} // Durée des animations
className="fixed top-5 right-5 flex items-stretch w-96 rounded-lg shadow-lg bg-white z-50 border border-gray-200"
className="fixed top-5 right-5 flex items-stretch rounded-lg shadow-lg bg-white z-50 border border-gray-200"
>
{/* Rectangle gauche avec l'icône */}
<div className={`flex items-center justify-center w-12 ${bg}`}>
<div className={`flex items-center justify-center w-14 ${bg}`}>
{icon}
</div>
{/* Zone de texte */}
<div className="flex-1 p-4">
<div className="flex-1 w-96 p-4">
<p className="font-bold text-black">{title}</p>
<p className="text-gray-700">{message}</p>
</div>