Skip to content

Commit

Permalink
fix: changed return type of onError function to ReactNode
Browse files Browse the repository at this point in the history
  • Loading branch information
sadik-malik committed Sep 4, 2024
1 parent 5e39c31 commit de2aa1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rhf-mui/src/FormErrorProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {createContext, PropsWithChildren, useContext} from 'react'
import {createContext, useContext, type PropsWithChildren, type ReactNode } from 'react'
import {FieldError} from 'react-hook-form'

export type FormErrorProviderProps = {
onError: (error: FieldError) => string | undefined
onError: (error: FieldError) => ReactNode
}

const FormErrorProviderContext = createContext<FormErrorProviderProps>({
Expand Down

0 comments on commit de2aa1a

Please sign in to comment.