From 51f9d1056c2644123af33c05094fb168c1f45d51 Mon Sep 17 00:00:00 2001 From: Nick Savage Date: Thu, 19 Dec 2024 20:21:55 -0500 Subject: [PATCH] frontend: add delete button to entity window, improve styling --- .../components/entities/EditEntityDialog.tsx | 82 +++++++++++-------- .../src/components/entities/EntityList.tsx | 41 +++++++--- 2 files changed, 80 insertions(+), 43 deletions(-) diff --git a/zettelkasten-front/src/components/entities/EditEntityDialog.tsx b/zettelkasten-front/src/components/entities/EditEntityDialog.tsx index 42da03c..67d4548 100644 --- a/zettelkasten-front/src/components/entities/EditEntityDialog.tsx +++ b/zettelkasten-front/src/components/entities/EditEntityDialog.tsx @@ -10,9 +10,10 @@ interface EditEntityDialogProps { isOpen: boolean; onClose: () => void; onSuccess: () => void; + onDelete: (entity: Entity) => void; } -export function EditEntityDialog({ entity, isOpen, onClose, onSuccess }: EditEntityDialogProps) { +export function EditEntityDialog({ entity, isOpen, onClose, onSuccess, onDelete }: EditEntityDialogProps) { const [name, setName] = useState(""); const [description, setDescription] = useState(""); const [type, setType] = useState(""); @@ -69,18 +70,20 @@ export function EditEntityDialog({ entity, isOpen, onClose, onSuccess }: EditEnt }; return ( - +