From 6e570ee411c7fd3b3ff3b54a06851b761dec7ca5 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Fri, 20 Jun 2025 11:25:14 +0530 Subject: [PATCH] align "Add a Note" button to right and switch to left consistently --- src/components/Directory/NotesDirectory.jsx | 82 ++++++++++----------- src/components/common/TextEditor/Editor.jsx | 2 +- 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/components/Directory/NotesDirectory.jsx b/src/components/Directory/NotesDirectory.jsx index eb3ac8a5..5ddb37c8 100644 --- a/src/components/Directory/NotesDirectory.jsx +++ b/src/components/Directory/NotesDirectory.jsx @@ -88,7 +88,8 @@ const NotesDirectory = ({ }; const onCancel = () => { - setValue("note", ""); + setValue( "note", "" ); + }; const handleSwitch = () => { setIsActive(!IsActive); @@ -103,48 +104,45 @@ const NotesDirectory = ({

Notes :

- {contactNotes?.length > 0 && ( -
- -
- )} - - {!addNote && ( -
0 - ? "d-flex justify-content-center px-2" - : "d-flex justify-content-center px-2w-100" - }`} - > - setAddNote(!addNote)} - > - {addNote ? "Hide Editor" : "Add a Note"} - -
- )} +
+ {contactNotes?.length > 0 ? ( + + ) : ( +
+
+ )} +
+ +
+ setAddNote(!addNote)} + > + {addNote ? "Hide Editor" : "Add a Note"} + +
+
+ {addNote && (
diff --git a/src/components/common/TextEditor/Editor.jsx b/src/components/common/TextEditor/Editor.jsx index cb076ad3..e75af0cf 100644 --- a/src/components/common/TextEditor/Editor.jsx +++ b/src/components/common/TextEditor/Editor.jsx @@ -78,7 +78,7 @@ const Editor = ({ aria-disabled={loading} onClick={onCancel} > - Cancel + Clear