From 03cd3db1c7db2fc92216d0bf4234ea5de905a3e3 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 25 Jul 2026 01:35:41 +0100 Subject: [PATCH] Enhance NoteItem component with new props for body and footer visibility - Added showBody and showFooter props to the NoteItem component to control the rendering of the note's content and footer elements. - Refactored the component structure to conditionally display the body and footer based on the new props, improving flexibility in note presentation. --- src/components/Dashboard/common/NoteItem.jsx | 176 ++++++++++--------- 1 file changed, 93 insertions(+), 83 deletions(-) diff --git a/src/components/Dashboard/common/NoteItem.jsx b/src/components/Dashboard/common/NoteItem.jsx index 45f7977..69f610b 100644 --- a/src/components/Dashboard/common/NoteItem.jsx +++ b/src/components/Dashboard/common/NoteItem.jsx @@ -36,6 +36,8 @@ const NoteItem = ({ showChildNotes = true, showActions = true, showInfo = true, + showBody = true, + showFooter = true, largeSpacing = false }) => { const [childNotes, setChildNotes] = useState([]) @@ -162,90 +164,96 @@ const NoteItem = ({ const noteItem = ( <> - - - - {note.user.name}: - -
- -
-
- - - {showActions && ( - <> - - - - - - )} - - Type: - - {note.noteType.name} - - - - User ID: - - - {showCreatedAt && ( - - Created At: - - - )} - - - {showInfo && ( - + + + + )} + + Type: + + {note.noteType.name} + + + + User ID: + + + {showCreatedAt && ( + + Created At: + + + )} + + + {showInfo && ( +