From 0c4f4303ef396185f5afc1c1dc6a7227ddd08bfa Mon Sep 17 00:00:00 2001 From: Yiwahpsp Date: Tue, 29 Oct 2024 15:15:52 +0700 Subject: [PATCH] fix: layout form, error input comp, font size --- src/app/form/[id]/page.tsx | 2 +- src/components/form/form-question.tsx | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/form/[id]/page.tsx b/src/app/form/[id]/page.tsx index cad6224..a3d6dd8 100644 --- a/src/app/form/[id]/page.tsx +++ b/src/app/form/[id]/page.tsx @@ -45,7 +45,7 @@ export default function Page({ params: { id } }: PageProps) { } return ( -
+
diff --git a/src/components/form/form-question.tsx b/src/components/form/form-question.tsx index 85f74da..f2222d8 100644 --- a/src/components/form/form-question.tsx +++ b/src/components/form/form-question.tsx @@ -8,11 +8,11 @@ export function FormQuestion({ column }: { column: FormColumn }) { return (
-

+

{column.label} - {column.required ? * : null} + {column.required ?

*

: null}

-

+

{column.description}

@@ -46,6 +46,7 @@ export function FormQuestion({ column }: { column: FormColumn }) { type='checkbox' name={column.columnName} required={column.required} + className='size-4 rounded-md' onInvalid={(e) => { e.preventDefault() ;( @@ -59,7 +60,7 @@ export function FormQuestion({ column }: { column: FormColumn }) { ).nextElementSibling?.classList.add('hidden') }} /> -

+

จำเป็นต้องยอมรับ

@@ -94,7 +95,7 @@ export function FormQuestion({ column }: { column: FormColumn }) { ))} -

+

จำเป็นต้องเลือก