Просмотр исходного кода

Merge pull request #414 from weseek/feat/Markdown-editor-for-comment-takizawa

Feat/markdown editor for comment takizawa
Yuki Takei 7 лет назад
Родитель
Сommit
661ac37a0a
1 измененных файлов с 28 добавлено и 1 удалено
  1. 28 1
      resource/js/components/PageComment/CommentForm.js

+ 28 - 1
resource/js/components/PageComment/CommentForm.js

@@ -1,5 +1,8 @@
 import React from 'react';
 import PropTypes from 'prop-types';
+import FormControl from 'react-bootstrap/es/FormControl';
+import Button from 'react-bootstrap/es/Button';
+import UserPicture from '../User/UserPicture';
 
 /**
  *
@@ -15,12 +18,36 @@ export default class CommentForm extends React.Component {
     super(props);
 
     this.state = {
+      value: ''
     };
   }
 
   render() {
+
     return (
-      <h1>CommentForm.js</h1>
+      <div className="comment-form">
+        <div className="comment-form-user">
+        </div>
+        <div className="comment-form-main">
+          <div className="comment-write">
+            <textarea className="comment-form-comment form-control" id="comment-form-comment" name="commentForm[comment]" required placeholder="Write comments here..." >
+            </textarea>
+            <div className="form-check">
+            <input type="checkbox" className="form-check-input" id="checkbox-markdown" />
+              <label className="form-check-label" htmlFor="checkbox-markdown">Markdown</label>
+            </div>
+          </div>
+          <div className="comment-submit">
+            <div className="pull-right">
+              <Button bsStyle="primary" className="fcbtn btn btn-sm btn-primary btn-outline btn-rounded btn-1b">
+                  Comment
+              </Button>
+            </div>
+            <div className="clearfix">
+            </div>
+          </div>
+        </div>
+      </div>
     );
   }
 }