]> Untitled Git - lemmy-ui.git/commitdiff
Adding a comment here placeholder. Fixes #301
authorDessalines <tyhou13@gmx.com>
Thu, 3 Jun 2021 15:24:45 +0000 (11:24 -0400)
committerDessalines <tyhou13@gmx.com>
Thu, 3 Jun 2021 15:24:45 +0000 (11:24 -0400)
src/shared/components/comment-form.tsx
src/shared/components/markdown-textarea.tsx

index a2da93315927eb32a72ec446d2c5ff9858e6164d..15a6838663388b79cfb7a2be323379790db88cbe 100644 (file)
@@ -82,6 +82,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
             disabled={this.props.disabled}
             onSubmit={this.handleCommentSubmit}
             onReplyCancel={this.handleReplyCancel}
+            placeholder={i18n.t("comment_here")}
           />
         ) : (
           <div class="alert alert-light" role="alert">
index 0acfc4c5ec79cd7b3dedc92778a4721765f7c5ab..835f0e8129971f99613507a8c454a05b16cc6b7a 100644 (file)
@@ -28,6 +28,7 @@ interface MarkdownTextAreaProps {
   onContentChange?(val: string): any;
   onReplyCancel?(): any;
   hideNavigationWarnings?: boolean;
+  placeholder?: string;
 }
 
 interface MarkdownTextAreaState {
@@ -131,6 +132,7 @@ export class MarkdownTextArea extends Component<
               disabled={this.props.disabled}
               rows={2}
               maxLength={this.props.maxLength || 10000}
+              placeholder={this.props.placeholder}
             />
             {this.state.previewMode && (
               <div