update notifications css

This commit is contained in:
Giovanni committed 2026-01-11 20:05:20 +01:00
1 parent c906cb733e
commit b0d7d3c0af
6 files changed
+98 -22

No files matched your search

@@ -0,0 +1,34 @@
import formatDate from "../../utils/date/formatDate.js";
import formatTime from "../../utils/date/formatTime.js";
import styles from "./NotificationCard.module.css"
function NotificationCard({notifications, deleteNotification}) {
return (
notifications.map((notification, index) => (
<div className={styles.notificationCard} key={index}>
<div className={styles.cardHeader}>
<span className={styles.timeTag}>
Le {formatDate(notification.created_at)} à {formatTime(notification.created_at)}
</span>
<button
className={styles.closeIconButton}
onClick={() => deleteNotification(notification.id)}
title="Supprimer"
>
✕
</button>
</div>
<div className={styles.cardContent}>
<p className={styles.message}>
{notification.content}
</p>
</div>
</div>
))
);
}
export default NotificationCard;
@@ -0,0 +1,46 @@
.notificationCard {
padding: 1.25rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
transition: background 0.2s ease;
}
.cardHeader {
display: flex;
justify-content: space-between;
align-items: center;
}
.timeTag {
font-size: 0.9rem;
font-weight: 500;
color: #019AFF;
letter-spacing: 0.2px;
}
.message {
margin: 0;
font-size: 1.1rem;
line-height: 1.5;
color: #2c3e50;
font-weight: 400;
}
.closeIconButton {
background: none;
border: none;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 1.1rem;
color: #2c3e50;
}
.closeIconButton:hover {
color: #cc0000;
}