Type for renderFlag function extended to make available to place any JSX.Element and render it on flag place.
Motivation
I want to use this lib in FC way with external library (react-native-country-picker-modal) with both auto-detect country by calling code feature and set calling code on country select with modal feature
I've tested, it works fine.
But without this PR i have to deal with type error that says that Type '({ imageSource }: { imageSource: number; }) => JSX.Element' is not assignable to type '({ imageSource }: { imageSource: number; }) => Element'.
CountryPicker in provided example is exported from react-native-country-picker-modal 2.0.0. It's JSX.Element
Additional info
Rendering CountryPicker as children is also not allowed (even though Readme file says it). If you'll accept this PR i'm going to update Readme file too and add to documentation new clean and actual example with external library usage like react-native-country-picker-modal in FC way.
Description
Type for
renderFlag
function extended to make available to place any JSX.Element and render it on flag place.Motivation
I want to use this lib in FC way with external library (
react-native-country-picker-modal
) with both auto-detect country by calling code feature and set calling code on country select with modal featureI've tested, it works fine.
But without this PR i have to deal with type error that says that
Type '({ imageSource }: { imageSource: number; }) => JSX.Element' is not assignable to type '({ imageSource }: { imageSource: number; }) => Element'.
CountryPicker
in provided example is exported fromreact-native-country-picker-modal 2.0.0
. It's JSX.ElementAdditional info
Rendering CountryPicker as children is also not allowed (even though Readme file says it). If you'll accept this PR i'm going to update Readme file too and add to documentation new clean and actual example with external library usage like
react-native-country-picker-modal
in FC way.Best regards