mirror of
https://github.com/iconoir-icons/iconoir
synced 2024-06-03 06:22:21 +02:00
14 lines
486 B
TypeScript
14 lines
486 B
TypeScript
import React from 'react'
|
|
import { SvgProps } from 'react-native-svg'
|
|
|
|
export type IconoirContextValue = Partial<SvgProps>
|
|
export const IconoirContext = React.createContext<IconoirContextValue>({})
|
|
|
|
export interface IconoirProviderProps {
|
|
iconProps?: Partial<Omit<SvgProps, 'children'>>
|
|
children: React.ReactElement
|
|
}
|
|
export function IconoirProvider({ iconProps, children }: IconoirProviderProps) {
|
|
return <IconoirContext.Provider value={iconProps || {}} children={children} />
|
|
}
|