24 lines
647 B
TypeScript
24 lines
647 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
|
|
}
|
|
|
|
const FormSection = ({ children, titleNm, form, name }: FormSectionProps) => {
|
|
return (
|
|
<div className="grid grid-cols-[130px_1fr] items-center">
|
|
<div className="text-xl font-medium">{titleNm}</div>
|
|
<FormField
|
|
control={form.control}
|
|
name={name}
|
|
render={({ field }) => children}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default FormSection |