CommentForm.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import FormControl from 'react-bootstrap/es/FormControl';
  4. import Button from 'react-bootstrap/es/Button';
  5. import UserPicture from '../User/UserPicture';
  6. /**
  7. *
  8. * @author Yuki Takei <yuki@weseek.co.jp>
  9. *
  10. * @export
  11. * @class Comment
  12. * @extends {React.Component}
  13. */
  14. export default class CommentForm extends React.Component {
  15. constructor(props) {
  16. super(props);
  17. this.state = {
  18. value: ''
  19. };
  20. }
  21. handleChange(e) {
  22. this.setState({ value: e.target.value });
  23. }
  24. render() {
  25. const creator = "yusuketk";
  26. const creatorsPage = `/user/${creator}`;
  27. return (
  28. <div className="comment-form">
  29. <div className="comment-form-user">
  30. <a href={creatorsPage}>
  31. <UserPicture />
  32. </a>
  33. </div>
  34. <div className="comment-form-main">
  35. <div className="comment-write comment-form-editor">
  36. <textarea className="comment-form-comment form-control" id="comment-form-comment" name="commentForm[comment]" required placeholder="Write comments here..." >
  37. </textarea>
  38. <div className="form-check">
  39. <input type="checkbox" className="form-check-input" id="checkbox-markdown" />
  40. <label className="form-check-label" htmlFor="checkbox-markdown">Markdown</label>
  41. </div>
  42. </div>
  43. <div className="comment-submit">
  44. <div className="pull-right">
  45. <Button bsStyle="primary" className="fcbtn btn btn-sm btn-primary btn-outline btn-rounded btn-1b">
  46. Comment
  47. </Button>
  48. </div>
  49. <div className="clearfix">
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. );
  55. }
  56. }
  57. CommentForm.propTypes = {
  58. };