f6e150ddae
- composants UI (Input, Card, Badge, Modal, ConfirmDialog, Slider, Skeleton, ThemeToggle) + Sidebar - pages auth (connexion, inscription) - pages publiques (informations, détail, contacts urgence, mentions, RGPD) - espace membre (dashboard, journal, wizard saisie via fr-stepper, rapports, profil) + composants tracker (EditSaisieModal, EmotionPicker, TrackerTimeline, EmotionChart) - back-office admin (dashboard, utilisateurs, contenus, émotions) Suppression de Tailwind candlelight/malachite + lucide-react. Build OK (20 routes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import Modal from "./Modal";
|
|
import Button from "./Button";
|
|
|
|
interface ConfirmDialogProps {
|
|
isOpen: boolean;
|
|
title?: string;
|
|
message: string;
|
|
confirmLabel?: string;
|
|
cancelLabel?: string;
|
|
destructive?: boolean;
|
|
onConfirm: () => void;
|
|
onClose: () => void;
|
|
}
|
|
|
|
export default function ConfirmDialog({
|
|
isOpen,
|
|
title = "Confirmation",
|
|
message,
|
|
confirmLabel = "Confirmer",
|
|
cancelLabel = "Annuler",
|
|
destructive = false,
|
|
onConfirm,
|
|
onClose,
|
|
}: ConfirmDialogProps) {
|
|
return (
|
|
<Modal isOpen={isOpen} onClose={onClose} title={title} size="sm">
|
|
<p className="fr-mb-3w">{message}</p>
|
|
|
|
<ul className="fr-btns-group fr-btns-group--right fr-btns-group--inline-reverse fr-btns-group--inline-lg">
|
|
<li>
|
|
<Button
|
|
variant={destructive ? "danger" : "primary"}
|
|
onClick={() => {
|
|
onConfirm();
|
|
onClose();
|
|
}}
|
|
>
|
|
{confirmLabel}
|
|
</Button>
|
|
</li>
|
|
<li>
|
|
<Button variant="secondary" onClick={onClose}>
|
|
{cancelLabel}
|
|
</Button>
|
|
</li>
|
|
</ul>
|
|
</Modal>
|
|
);
|
|
}
|