mirror of
https://github.com/iconoir-icons/iconoir
synced 2024-05-09 18:06:54 +02:00
fix: change provider children type to ReactNode (#270)
This commit is contained in:
parent
c8662542d6
commit
c3a359f554
|
@ -6,7 +6,7 @@ export const IconoirContext = React.createContext<IconoirContextValue>({})
|
|||
|
||||
export interface IconoirProviderProps {
|
||||
iconProps?: Partial<Omit<SvgProps, 'children'>>
|
||||
children: React.ReactElement
|
||||
children: React.ReactNode
|
||||
}
|
||||
export function IconoirProvider({ iconProps, children }: IconoirProviderProps) {
|
||||
return <IconoirContext.Provider value={iconProps || {}} children={children} />
|
||||
|
|
|
@ -5,7 +5,7 @@ export const IconoirContext = React.createContext<IconoirContextValue>({})
|
|||
|
||||
export interface IconoirProviderProps {
|
||||
iconProps?: Partial<React.SVGProps<SVGSVGElement>>
|
||||
children: React.ReactElement
|
||||
children: React.ReactNode
|
||||
}
|
||||
export function IconoirProvider({ iconProps, children }: IconoirProviderProps) {
|
||||
return <IconoirContext.Provider value={iconProps || {}} children={children} />
|
||||
|
|
|
@ -7,7 +7,7 @@ console.warn('Using IconoirContext in server components has no effect, because '
|
|||
export interface IconoirContextValue {}
|
||||
export const IconoirContext = null
|
||||
interface IconoirProviderProps {
|
||||
children: React.ReactElement
|
||||
children: React.ReactNode
|
||||
}
|
||||
export function IconoirProvider({ children }: IconoirProviderProps) {
|
||||
return children
|
||||
|
|
Loading…
Reference in a new issue