Skip to content

Commit

Permalink
Merge pull request #223 from martynaskup/children_props_in_field
Browse files Browse the repository at this point in the history
Add children props to Field component - Issue #222
  • Loading branch information
jannikbuschke authored Nov 11, 2024
2 parents 5fbfbe5 + c044c35 commit 1d769a1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/field/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Field as FormikField, FastField } from 'formik'
import { Field as FormikField, FastField, FieldProps } from 'formik'
import { FormikFieldProps } from '../FieldProps'
import * as React from 'react'
import { ReactNode } from 'react'

export const Field: React.FC<FormikFieldProps> = ({
fast,
children,
...restProps
}) => {
export const Field: React.FC<
FormikFieldProps & { children: (field: FieldProps) => ReactNode }
> = ({ fast, children, ...restProps }) => {
if (fast) {
return <FastField {...restProps}>{children}</FastField>
}
Expand Down

0 comments on commit 1d769a1

Please sign in to comment.