Closed kopax-polyconseil closed 2 years ago
The component uses font -apple-system to show the country flags. The -apple-system font is not fully compatible with some browser on Linux or Windows.
It could be better to use png images or maybe give the possibility to choose png or font
withEmoji=false
use base 64 sources with <img />
.
Using https://www.npmjs.com/package/react-world-flags,
yarn add -D react-world-flags @types/react-world-flags
echo "export { Flag } from '../../../src/ui/components/Flags'" > node_modules/react-native-country-picker-modal/lib/Flag.web.js`
npx patch-package react-native-country-picker-modal
wget -O src/ui/components/Flags.tsx https://raw.githubusercontent.com/xcarpentier/react-native-country-picker-modal/master/src/Flag.tsx
Then use svg with Flag
component, from src/ui/components/Flags
:
+ import RWFlag from 'react-world-flags'
- <EmojiFlag {...{ countryCode, flagSize }} />
+ <RNWFlag code={countryCode} height={flagSize} />
Issue Description
I'd like to say thanks for sharing, this module is awesome,
I have a little question since your Web example demo also show black flags, as in our web application:
But the screenshot here in the readme show the correct flag:
Is there anything extra to set up in order to have proper flags for countries in our Web application?