xcarpentier / react-native-country-picker-modal

🇦🇶 Country picker provides a modal allowing a user to select a country from a list. It display a flag next to each country name.
https://reactnative.gallery/xcarpentier/country-picker
MIT License
1.07k stars 796 forks source link

can't change the style of flags #448

Closed TatsianaKedrova closed 2 years ago

TatsianaKedrova commented 2 years ago

Issue Description

The library works well but I have one problem: I need to style flags to be round, not rectangular. There is props containerButtonStyle in react-native-country-picker-modal, but it changes just the position of the flag, not its shape or size. Maybe I missed something while investigating the library and will be happy to find the way to style the flags.

Steps to Reproduce / Code Snippets

I just added styles to containerButtonStyle prop: <CountryPicker countryCode={countryCode} withCallingCode withFlag onSelect={country => { const {cca2, callingCode} = country; setCountryCode(cca2); setCallingCode(callingCode[0]); }} containerButtonStyle={{ width: 24, height: 24, position: 'relative', left: 4, backgroundColor: 'pink', borderRadius: 6, }} visible={false} />

Expected Results

Flags should be round (or have borderRadius: 6)

Additional Information

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.