From a385d89dfd6312f2255d1343cea3f63375ce5b39 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 7 Jan 2022 16:34:55 +0100 Subject: chore: improve comment section I also adjust styles for all forms and primary buttons. --- src/components/CommentForm/CommentForm.module.scss | 12 +++ src/components/CommentForm/CommentForm.tsx | 96 ++++++++++++---------- 2 files changed, 63 insertions(+), 45 deletions(-) create mode 100644 src/components/CommentForm/CommentForm.module.scss (limited to 'src/components/CommentForm') diff --git a/src/components/CommentForm/CommentForm.module.scss b/src/components/CommentForm/CommentForm.module.scss new file mode 100644 index 0000000..2330ca2 --- /dev/null +++ b/src/components/CommentForm/CommentForm.module.scss @@ -0,0 +1,12 @@ +@use "@styles/abstracts/functions" as fun; + +.wrapper { + width: min(calc(100vw - (var(--spacing-md) * 2)), fun.convert-px(500)); + margin: auto; +} + +.title { + width: max-content; + margin-left: auto; + margin-right: auto; +} diff --git a/src/components/CommentForm/CommentForm.tsx b/src/components/CommentForm/CommentForm.tsx index b2d538f..ea02306 100644 --- a/src/components/CommentForm/CommentForm.tsx +++ b/src/components/CommentForm/CommentForm.tsx @@ -4,6 +4,7 @@ import Notice from '@components/Notice/Notice'; import { t } from '@lingui/macro'; import { createComment } from '@services/graphql/mutations'; import { useState } from 'react'; +import styles from './CommentForm.module.scss'; const CommentForm = ({ articleId, @@ -57,51 +58,56 @@ const CommentForm = ({ }; return ( -
- - - - - - - - - - -