CommentControl.tsx 691 B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. type CommentControlProps = {
  3. onClickEditBtn: () => void,
  4. onClickDeleteBtn: () => void,
  5. }
  6. export const CommentControl = (props: CommentControlProps): JSX.Element => {
  7. const { onClickEditBtn, onClickDeleteBtn } = props;
  8. return (
  9. // The page-comment-control class is imported from Comment.module.scss
  10. <div className="page-comment-control">
  11. <button type="button" className="btn btn-link p-2" onClick={onClickEditBtn}>
  12. <i className="ti ti-pencil"></i>
  13. </button>
  14. <button type="button" className="btn btn-link p-2 mr-2" onClick={onClickDeleteBtn}>
  15. <i className="ti ti-close"></i>
  16. </button>
  17. </div>
  18. );
  19. };