-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE REQUEST: Allow customised CountrySelector #169
Comments
I fixed this at my PR But I don't have time to write the tests and follow the guidelines. I'll publish it as personal package and add it here You can see it working here: https://react-international-phone-git-e93393-yurii-brusentsovs-projects.vercel.app/?path=/story/phoneinput--with-order Also, I added a new customArrow prop: https://react-international-phone-git-e93393-yurii-brusentsovs-projects.vercel.app/?path=/story/phoneinput--with-custom-arrow |
While this library is lightweight and works great, is not very customisable in terms of aspect, many customers don't like displaying flags within their inputs but this library leaves not alternative.
CountrySelector
just displays a flag, it would be great if also allows displaying either the country name or country prefix.Proposed solution
Add option to
CountrySelector
calleddisplay
where the allowed options are:Flag
(default)Name
Prefix
For instance:
Although a perfect solution would be allowing all possible combination of those (flag. + name), (flag + prefix), (flag. + name + prefix), (name + prefix), etc..)
Flag + Name + Prefix:
![Screenshot 2024-03-20 at 13 04 00](https://private-user-images.githubusercontent.com/8544110/314492120-48704a00-8f3f-45c6-aeac-b409b098b784.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NTM4NTIsIm5iZiI6MTcyMjQ1MzU1MiwicGF0aCI6Ii84NTQ0MTEwLzMxNDQ5MjEyMC00ODcwNGEwMC04ZjNmLTQ1YzYtYWVhYy1iNDA5YjA5OGI3ODQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDczMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MzFUMTkxOTEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2QzNTE4MGE3NWIzMTA2ODI2ZDgyNGEyNjk2Mjc4MjZkZjM2NGIyNDgwMDZhMWU5N2I5OTlkMmY2MTNjZmU0OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ._CY6VVEEYnhMpcauegvhfvz19ECuxUoNFjLTBrGZWI0)
Would be as easy as adding the new
display
property within the Country selector API, and making FlagImage optional.The text was updated successfully, but these errors were encountered: