PageCommentSkeleton.tsx 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import React from 'react';
  2. import { Skeleton } from './Skeleton';
  3. import styles from './PageComment.module.scss';
  4. import CommentStyles from './PageComment/Comment.module.scss';
  5. import CommentEditorStyles from './PageComment/CommentEditor.module.scss';
  6. type PageCommentSkeletonProps = {
  7. commentTitleClasses?: string,
  8. roundedPill?: boolean,
  9. }
  10. export const PageCommentSkeleton = (props: PageCommentSkeletonProps): JSX.Element => {
  11. const {
  12. commentTitleClasses,
  13. } = props;
  14. return (
  15. <>
  16. {/* TODO: Check the comment.html CSS */}
  17. <div className={`${styles['page-comment-styles']} page-comments-row comment-list`}>
  18. <div className="container-lg">
  19. <div className="page-comments">
  20. <h2 className={commentTitleClasses}><i className="icon-fw icon-bubbles"></i>Comments</h2>
  21. <div className="page-comments-list" id="page-comments-list">
  22. <div className={`${CommentStyles['comment-styles']} page-comment-thread pb-5 page-comment-thread-no-replies`}>
  23. <div className='page-comment flex-column'>
  24. <div className='page-commnet-writer'>
  25. <Skeleton additionalClass='rounded-circle picture' roundedPill />
  26. </div>
  27. <Skeleton additionalClass="page-comment-comment-body-skeleton grw-skeleton" />
  28. </div>
  29. <div className='page-comment flex-column ml-4 ml-sm-5 mr-3'>
  30. <div className='page-commnet-writer mt-3'>
  31. <Skeleton additionalClass='rounded-circle picture' roundedPill />
  32. </div>
  33. <Skeleton additionalClass="page-comment-comment-body-skeleton grw-skeleton mt-3" />
  34. </div>
  35. <div className="text-right">
  36. <Skeleton additionalClass="page-comment-button-skeleton btn btn-outline-secondary btn-sm grw-skeleton" />
  37. </div>
  38. </div>
  39. </div>
  40. <div className={`${CommentEditorStyles['comment-editor-styles']} form page-comment-form`}>
  41. <div className='comment-form'>
  42. <div className='comment-form-user'>
  43. <Skeleton additionalClass='rounded-circle picture' roundedPill />
  44. </div>
  45. <Skeleton additionalClass="page-comment-commenteditorlazyrenderer-body-skeleton grw-skeleton" />
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </>
  52. );
  53. };