mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-15 11:17:42 +02:00
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:
2 files changed
+50
-4
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user