new tool timer & alert revamp
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s

This commit is contained in:
Shinuwa 2026-07-26 11:41:42 +02:00
parent 0c7ae46b4d
commit 68005ef918
38 changed files with 2048 additions and 111 deletions

View file

@ -1,5 +1,6 @@
// Rôle : fournit les modales globales liées aux toolboxes et confirmations.
import { useEffect, useState } from "react";
import { Icon } from "./Icon.jsx";
import { lockBodyScroll } from "../utils/bodyScrollLock.js";
function useModalScrollLock() {
@ -23,10 +24,13 @@ export function ConfirmModal({ title, message, confirmLabel = "Confirmer", cance
);
}
export function NotificationToast({ message }) {
export function NotificationToast({ message, position = "right", onClose }) {
return (
<div className="notification-toast" role="status" aria-live="polite">
{message}
<div className={`notification-toast is-${position === "left" ? "left" : "right"}`} role="status" aria-live="polite">
<span>{message}</span>
<button type="button" onClick={onClose} aria-label="Fermer l'alerte" title="Fermer">
<Icon name="close" />
</button>
</div>
);
}