CommentForm.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import FormControl from 'react-bootstrap/es/FormControl';
  4. import UserPicture from '../User/UserPicture';
  5. /**
  6. *
  7. * @author Yuki Takei <yuki@weseek.co.jp>
  8. *
  9. * @export
  10. * @class Comment
  11. * @extends {React.Component}
  12. */
  13. export default class CommentForm extends React.Component {
  14. constructor(props) {
  15. super(props);
  16. this.state = {
  17. value: ''
  18. };
  19. }
  20. handleChange(e) {
  21. this.setState({ value: e.target.value });
  22. }
  23. render() {
  24. const creator = "yusuketk";
  25. const creatorsPage = `/user/${creator}`;
  26. return (
  27. <div className="comment-form">
  28. <a href={creatorsPage}>
  29. <UserPicture />
  30. </a>
  31. <div className="comment-form-main">
  32. <div className="comment-form-editor">
  33. </div>
  34. <FormControl
  35. type="text"
  36. value={this.state.value}
  37. placeholder="Write comments here..."
  38. onChange={this.handleChange}
  39. />
  40. </div>
  41. </div>
  42. );
  43. }
  44. }
  45. CommentForm.propTypes = {
  46. };