aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/CommentsList
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-07 16:34:55 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-07 19:04:13 +0100
commita385d89dfd6312f2255d1343cea3f63375ce5b39 (patch)
treecad32cfd21e188eb1c145d0fda173da7f353b591 /src/components/CommentsList
parent8efb9219116a6c665d1059d3218c9405c616e404 (diff)
chore: improve comment section
I also adjust styles for all forms and primary buttons.
Diffstat (limited to 'src/components/CommentsList')
-rw-r--r--src/components/CommentsList/CommentsList.module.scss9
-rw-r--r--src/components/CommentsList/CommentsList.tsx3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/components/CommentsList/CommentsList.module.scss b/src/components/CommentsList/CommentsList.module.scss
index 2358948..4971b15 100644
--- a/src/components/CommentsList/CommentsList.module.scss
+++ b/src/components/CommentsList/CommentsList.module.scss
@@ -1,5 +1,14 @@
@use "@styles/abstracts/placeholders";
+.title,
+.no-comments {
+ width: max-content;
+ margin-left: auto;
+ margin-right: auto;
+}
+
.list {
@extend %reset-ordered-list;
+
+ margin-bottom: var(--spacing-lg);
}
diff --git a/src/components/CommentsList/CommentsList.tsx b/src/components/CommentsList/CommentsList.tsx
index 6599475..3a1c57e 100644
--- a/src/components/CommentsList/CommentsList.tsx
+++ b/src/components/CommentsList/CommentsList.tsx
@@ -12,10 +12,11 @@ const CommentsList = ({ comments }: { comments: CommentData[] }) => {
return (
<>
+ <h2 className={styles.title}>{t`Comments`}</h2>
{comments.length > 0 ? (
<ol className={styles.list}>{getCommentsList()}</ol>
) : (
- <p>{t`No comments yet.`}</p>
+ <p className={styles['no-comments']}>{t`No comments yet.`}</p>
)}
</>
);