Skip to content

Commit

Permalink
fix: font size form question
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiwahpsp committed Oct 30, 2024
1 parent 9cfa71e commit 97f8fd6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/components/form/form-question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export function FormQuestion({ column }: { column: FormColumn }) {
return (
<div className='flex w-full flex-col items-start justify-start gap-2.5'>
<div className='flex flex-col'>
<h3 className='flex gap-1 text-subtitle font-semibold text-neutral-900'>
<h3 className='text-header-1 font-bold text-neutral-900'>
{column.label}
{column.required ? <p className='text-red-500'>*</p> : null}
{column.required ? <span className='text-red-500'> *</span> : null}
</h3>
<p className='text-body-1 font-normal text-gray-600'>
<p className='text-subtitle font-light text-gray-600'>
{column.description}
</p>
</div>
Expand Down Expand Up @@ -40,7 +40,7 @@ export function FormQuestion({ column }: { column: FormColumn }) {
) : null}
{UIDataType[column.uidt] === UIDataType.Checkbox ? (
<div className='flex w-full flex-col items-start justify-start'>
<div className='relative flex w-full cursor-pointer select-none flex-row-reverse items-center justify-end'>
<label className='relative flex w-full cursor-pointer select-none flex-row-reverse items-center justify-end'>
<p className='ml-2 text-body-1 text-black'>ยอมรับ</p>
<input
type='checkbox'
Expand All @@ -58,20 +58,19 @@ export function FormQuestion({ column }: { column: FormColumn }) {
e.target as HTMLInputElement
).nextElementSibling?.classList.add('hidden')
}}
className='size-4 rounded-md border-neutral-200'
/>
<p className='absolute -bottom-8 my-2 hidden w-full text-body-2 italic text-red-600'>
จำเป็นต้องยอมรับ
</p>
</div>
</label>
</div>
) : null}
{UIDataType[column.uidt] === UIDataType.SingleSelect ? (
<div className='relative flex w-full'>
<select
name={column.columnName}
required={column.required}
className='flex h-10 w-full rounded-md border border-neutral-200 px-2 py-1'
className='flex h-10 w-full rounded-md border border-neutral-200 px-2 py-1 text-body-1'
defaultValue=''
onInvalid={(e) => {
e.preventDefault()
Expand All @@ -95,7 +94,7 @@ export function FormQuestion({ column }: { column: FormColumn }) {
</option>
))}
</select>
<p className='absolute -bottom-8 my-2 hidden w-full text-sm italic text-red-600'>
<p className='absolute -bottom-8 my-2 hidden w-full text-body-2 italic text-red-600'>
จำเป็นต้องเลือก
</p>
</div>
Expand All @@ -105,7 +104,7 @@ export function FormQuestion({ column }: { column: FormColumn }) {
<textarea
name={column.columnName}
required={column.required}
className='body flex h-20 w-full resize-none overflow-y-scroll rounded-md border border-neutral-200 px-2 py-1'
className='flex h-20 w-full resize-none overflow-y-scroll rounded-md border border-neutral-200 px-2 py-1 text-body-1'
onInvalid={(e) => {
e.preventDefault()
;(
Expand Down

0 comments on commit 97f8fd6

Please sign in to comment.