Files
frontend/apps/sn/app/components/ui/formSection.tsx
T
swcho 4845450ea5 feat, refactor:
- 수용가-맨홀 매칭결과 양식 파일 다운로드 기능 추가
- 파일 다운로드 버튼 색상 green으로 변경
2025-08-19 18:23:47 +09:00

25 lines
677 B
TypeScript

import { FormField } from '@common/business_components/ui'
import React, { type ReactElement } from 'react'
interface FormSectionProps {
children: ReactElement
titleNm: string
form: any
name: string
required?: boolean
}
const FormSection = ({ children, titleNm, form, name, required }: FormSectionProps) => {
return (
<div className="grid grid-cols-[200px_1fr] items-center">
<div className="text-xl font-medium">{titleNm}{required && <span className="text-2xl text-red-500">*</span>}</div>
<FormField
control={form.control}
name={name}
render={({ field }) => children}
/>
</div>
)
}
export default FormSection