Improve display of PhoneInput

This commit is contained in:
Alex Gleason 2022-07-13 12:26:07 -05:00
parent 85cf99f618
commit 0ed1c3ca83
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 3 additions and 3 deletions

View file

@ -20,13 +20,13 @@ const CountryCodeDropdown: React.FC<ICountryCodeDropdown> = ({ countryCode, onCh
};
const menu: Menu = COUNTRY_CODES.map(code => ({
text: <>{code}</>,
text: <>+{code}</>,
action: handleMenuItem(code),
}));
return (
<DropdownMenu items={menu}>
<button className='p-4'>{countryCode}</button>
<button className='px-4'>+{countryCode}</button>
</DropdownMenu>
);
};

View file

@ -34,7 +34,7 @@ const PhoneInput: React.FC<IPhoneInput> = (props) => {
};
return (
<HStack>
<HStack alignItems='center'>
<CountryCodeDropdown
countryCode={countryCode}
onChange={handleCountryChange}