]> Untitled Git - lemmy-ui.git/commitdiff
Add classes to post and comment repy textareas
authorZetaphor <zetaphor@hey.com>
Fri, 16 Jun 2023 17:10:56 +0000 (14:10 -0300)
committerZetaphor <zetaphor@hey.com>
Fri, 16 Jun 2023 17:10:56 +0000 (14:10 -0300)
src/shared/components/comment/comment-form.tsx
src/shared/components/comment/comment-node.tsx
src/shared/components/post/post.tsx

index c60cde20161407905dd8f3ad977423e60c94392d..7e4aa9febfc45424e0b83544d624017321c6374b 100644 (file)
@@ -21,6 +21,7 @@ interface CommentFormProps {
   onReplyCancel?(): void;
   allLanguages: Language[];
   siteLanguages: number[];
+  containerClass?: string;
   onUpsertComment(form: EditComment | CreateComment): void;
 }
 
@@ -40,7 +41,7 @@ export class CommentForm extends Component<CommentFormProps, any> {
         : undefined;
 
     return (
-      <div className="mb-3">
+      <div className={["mb-3", this.props.containerClass].join(" ")}>
         {UserService.Instance.myUserInfo ? (
           <MarkdownTextArea
             initialContent={initialContent}
index 0380a72663935e8f119e309d1e5dc159723f3d7c..9ebbf3482004d2b2b47a9396c19f9d7dc2b10121 100644 (file)
@@ -400,6 +400,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                 focus
                 allLanguages={this.props.allLanguages}
                 siteLanguages={this.props.siteLanguages}
+                containerClass="comment-comment-container"
                 onUpsertComment={this.props.onEditComment}
               />
             )}
@@ -1143,6 +1144,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
             focus
             allLanguages={this.props.allLanguages}
             siteLanguages={this.props.siteLanguages}
+            containerClass="comment-comment-container"
             onUpsertComment={this.props.onCreateComment}
           />
         )}
index 9c68532bee5122c816ae12d4a48f12375b7c265e..652c38c2fd54e6a221c7754e0857e47a40d07a6c 100644 (file)
@@ -384,6 +384,7 @@ export class Post extends Component<any, PostState> {
                 disabled={res.post_view.post.locked}
                 allLanguages={this.state.siteRes.all_languages}
                 siteLanguages={this.state.siteRes.discussion_languages}
+                containerClass="post-comment-container"
                 onUpsertComment={this.handleCreateComment}
                 finished={this.state.finished.get(0)}
               />