+
+
+
+
+ {comment.author.name} commented
+ ยท {comment.timestamp}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {parseMentions(comment.text)}
+
+
+
+
+
+ {isReplying && (
+
+
+
+ )}
+
+ {isEditing && (
+
+
+
+ )}
+
+ {comment.replies &&
+ comment.replies.length > 0 &&
+ comment.replies.map((reply, index) => (
+
+ ))}
+
+ );
+}
+
+export default Comment;
diff --git a/packages/frappe-ui-react/src/components/comments/commentForm.tsx b/packages/frappe-ui-react/src/components/comments/commentForm.tsx
new file mode 100644
index 00000000..1c75a58b
--- /dev/null
+++ b/packages/frappe-ui-react/src/components/comments/commentForm.tsx
@@ -0,0 +1,45 @@
+import React, { useCallback, useState } from 'react';
+import TextEditor from '../textEditor';
+interface CommentFormProps {
+ onSubmit: (text: string) => void;
+ buttonText: string;
+ value?: string;
+}
+
+function CommentForm({ onSubmit, buttonText, value }: CommentFormProps) {
+ const [text, setText] = useState