react-native-phone-number-input
react-native-phone-number-input copied to clipboard
feat: add optional flat flags instead of default emoji flags
This will add a flatFlags boolean to able to display flat flags instead of emoji flags.
Hi, Thanks for this, To override this feature you can use countryPickerProps
Hi, Thanks for this, To override this feature you can use
countryPickerProps
I think the P.R is good, but using countryPickerProps is what works well too, so don't have to add a seperate prop for this.
countryPickerProps
only works in the picker, but if we use the layout="first"
we get the same emoji flag, to fix that just change the code of https://github.com/garganurag893/react-native-phone-number-input/blob/ccd16fc20d8a0a476867417279932db0e41fdb2b/lib/index.js#L130
to:
const { layout = "first", flagSize, countryPickerProps } = this.props;
const { countryCode } = this.state;
if (layout === "first") {
return (
<Flag
withEmoji={countryPickerProps?.withEmoji}
countryCode={countryCode}
flagSize={flagSize ? flagSize : DEFAULT_THEME.flagSize}
/>
);
}