@@ -6,7 +6,7 @@ import type { EditorRefApi } from "@plane/editor";
66import { CloseIcon } from "@plane/propel/icons" ;
77// plane imports
88import type { TCommentsOperations , TIssueComment } from "@plane/types" ;
9- import { isCommentEmpty } from "@plane/utils" ;
9+ import { cn , isCommentEmpty } from "@plane/utils" ;
1010// components
1111import { LiteTextEditor } from "@/components/editor/lite-text" ;
1212
@@ -46,7 +46,7 @@ export const CommentCardEditForm = observer(function CommentCardEditForm(props:
4646 } ) ;
4747 const commentHTML = watch ( "comment_html" ) ;
4848
49- const isEmpty = isCommentEmpty ( commentHTML ?? undefined ) ;
49+ const isEmpty = isCommentEmpty ( commentHTML ) ;
5050 const isEditorReadyToDiscard = editorRef . current ?. isEditorReadyToDiscard ( ) ;
5151 const isSubmitButtonDisabled = isSubmitting || ! isEditorReadyToDiscard ;
5252 const isDisabled = isSubmitting || isEmpty || isSubmitButtonDisabled ;
@@ -99,36 +99,53 @@ export const CommentCardEditForm = observer(function CommentCardEditForm(props:
9999 return asset_id ;
100100 } }
101101 projectId = { projectId }
102- parentClassName = "p-2"
102+ parentClassName = "p-2 bg-surface-1 "
103103 displayConfig = { {
104104 fontSize : "small-font" ,
105105 } }
106106 />
107107 </ div >
108- < div className = "flex gap-1 self-end" >
108+ < div className = "flex gap-2 self-end" >
109109 { ! isEmpty && (
110110 < button
111111 type = "button"
112112 onClick = { handleSubmit ( onEnter ) }
113113 disabled = { isDisabled }
114- className = { `group rounded-sm border border-green-500 bg-green-500/20 p-2 shadow-md duration-300 ${
115- isEmpty ? "cursor-not-allowed bg-gray-200" : "hover:bg-green-500"
116- } `}
114+ className = { cn (
115+ "group rounded-lg border size-7 flex items-center justify-center shadow-md duration-300" ,
116+ isDisabled
117+ ? "cursor-not-allowed border-green-500/50 bg-green-500/10"
118+ : "border-green-500 bg-green-500/20 hover:bg-green-500"
119+ ) }
117120 >
118121 < Check
119- className = { `h-3 w-3 text-green-500 duration-300 ${ isEmpty ? "text-black" : "group-hover:text-on-color" } ` }
122+ className = { cn (
123+ "size-4 duration-300" ,
124+ isDisabled ? "text-green-500/50" : "text-green-500 group-hover:text-on-color"
125+ ) }
120126 />
121127 </ button >
122128 ) }
123129 < button
124130 type = "button"
125- className = "group rounded-sm border border-red-500 bg-red-500/20 p-2 shadow-md duration-300 hover:bg-red-500"
131+ disabled = { isSubmitting }
132+ className = { cn (
133+ "group rounded-lg border size-7 flex items-center justify-center shadow-md duration-300" ,
134+ isSubmitting
135+ ? "cursor-not-allowed border-red-500/50 bg-red-500/10"
136+ : "border-red-500 bg-red-500/20 hover:bg-red-500"
137+ ) }
126138 onClick = { ( ) => {
127139 setIsEditing ( false ) ;
128140 editorRef . current ?. setEditorValue ( comment . comment_html ?? "<p></p>" ) ;
129141 } }
130142 >
131- < CloseIcon className = "size-3 text-red-500 duration-300 group-hover:text-on-color" />
143+ < CloseIcon
144+ className = { cn (
145+ "size-5 duration-300" ,
146+ isSubmitting ? "text-red-500/50" : "text-red-500 group-hover:text-on-color"
147+ ) }
148+ />
132149 </ button >
133150 </ div >
134151 </ form >
0 commit comments