From 5e42c3146d49b3f80aaa4db116b5123fcc6d1202 Mon Sep 17 00:00:00 2001 From: Sanne de Vries <65487235+sanne-san@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:12:49 +0100 Subject: [PATCH] Improved disabled state for "Add comment" button (#21717) REF https://linear.app/ghost/issue/PLG-281/change-button-to-being-disabled-without-input --- .../src/components/content/forms/Form.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/comments-ui/src/components/content/forms/Form.tsx b/apps/comments-ui/src/components/content/forms/Form.tsx index a8107b9b17..3cb53e1f3e 100644 --- a/apps/comments-ui/src/components/content/forms/Form.tsx +++ b/apps/comments-ui/src/components/content/forms/Form.tsx @@ -57,8 +57,7 @@ const FormEditor: React.FC = ({comment, submit, progress, setPr }, [editor, comment, openForm, dispatchAction]); if (progress === 'sending') { - submitText = null; - buttonIcon = ; + buttonIcon = ; } const stopIfFocused = useCallback((event) => { @@ -156,16 +155,13 @@ const FormEditor: React.FC = ({comment, submit, progress, setPr } {labs.commentImprovements ? ( ) : (