feat: déplacer les statistiques dans un modal popup

- Créer un nouveau composant StatsModal pour afficher les statistiques
- Ajouter une icône BarChart3 dans le header à côté du bouton de thème
- Retirer le StatsDashboard de sa position sous le calendrier
- Afficher les statistiques dans un modal au clic sur l'icône
This commit is contained in:
Claude committed 2025-11-28 20:25:33 +00:00
1 parent 0264f5e2f3
commit 3b8644bc4c
2 files changed
+50 -4

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { StatsDashboard } from "./StatsDashboard";
import { Note } from "@/services/NotesService";
import { Todo } from "@/services/TodosService";
interface StatsModalProps {
open: boolean;
onOpenChange: (open: boolean) => void;
notes: Note[];
todos: Todo[];
}
export function StatsModal({ open, onOpenChange, notes, todos }: StatsModalProps) {
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-2xl max-h-[80vh] overflow-y-auto">
<DialogHeader>
<DialogTitle className="text-2xl">Statistiques</DialogTitle>
</DialogHeader>
<div className="mt-4">
<StatsDashboard notes={notes} todos={todos} />
</div>
</DialogContent>
</Dialog>
);
}