Skip to content

Commit b25fc7b

Browse files
fix: fix show country flag
The CountryPicker component render the country flag using the component FlagButton
1 parent 7bc96be commit b25fc7b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/PhoneInput/PhoneInput.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import CountryPicker, {
44
CountryModalProvider,
55
DARK_THEME,
66
DEFAULT_THEME,
7-
Flag,
7+
FlagButton,
88
} from 'react-native-country-picker-modal';
99
import MaskInput from 'react-native-mask-input';
1010
import { EXCLUDED_COUNTRIES } from './constants';
@@ -43,9 +43,10 @@ export const PhoneInput: React.FC<PhoneInputProps> = (props) => {
4343

4444
const renderFlagButton = useCallback(
4545
() => (
46-
<Flag
46+
<FlagButton
4747
countryCode={countryCode}
4848
flagSize={flagProps?.flagSize || DEFAULT_THEME.flagSize}
49+
placeholder={countryCode}
4950
{...flagProps}
5051
/>
5152
),

0 commit comments

Comments
 (0)