From 2771de88f40a5f4ed7480bd8614532dda72deeda Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 4 Nov 2023 19:26:16 +0100 Subject: refactor(components): rewrite CommentForm component * remove `Notice` prop to handle it directly in the form * replace `saveComment` prop with `onSubmit` * use `useForm` hook to handle the form --- .../forms/comment-form/comment-form.module.scss | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/components/organisms/forms/comment-form/comment-form.module.scss') diff --git a/src/components/organisms/forms/comment-form/comment-form.module.scss b/src/components/organisms/forms/comment-form/comment-form.module.scss index a4de51e..0e40c2a 100644 --- a/src/components/organisms/forms/comment-form/comment-form.module.scss +++ b/src/components/organisms/forms/comment-form/comment-form.module.scss @@ -2,23 +2,22 @@ display: flex; flex-flow: column wrap; gap: var(--spacing-xs); + max-width: 45ch; +} - > * { - max-width: 45ch; - } +.field { + width: 100%; } -.title { +.btn { width: fit-content; - margin-inline: auto; - margin-bottom: var(--spacing-sm); + margin: var(--spacing-sm) auto 0; } -.field { - width: 100%; +.notice { + margin-block-start: var(--spacing-sm); } -.button { - display: block; - margin: var(--spacing-sm) auto 0; +.spinner { + margin-inline: auto; } -- cgit v1.2.3