Open History to see the last commit
1import { StringField } from './StringField'
2import type { ReactFormType } from '@tanstack/react-form'
3import type { sharedFormOptions } from './sharedForm'
4β
5interface FormSectionProps {
6 form: ReactFormType<typeof sharedFormOptions>
7}
8β
9export function FormSection(props: FormSectionProps) {
10 const { form } = props
11β
12 return (
13 <>
14 <form.Field name="address.street">
15 {(field) => <StringField field={field} />}
16 </form.Field>
17 <form.Field name="address.country">
18 {(field) => <StringField field={field} />}
19 </form.Field>
20 </>
21 )
22}