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 => ({ const menu: Menu = COUNTRY_CODES.map(code => ({
text: <>{code}</>, text: <>+{code}</>,
action: handleMenuItem(code), action: handleMenuItem(code),
})); }));
return ( return (
<DropdownMenu items={menu}> <DropdownMenu items={menu}>
<button className='p-4'>{countryCode}</button> <button className='px-4'>+{countryCode}</button>
</DropdownMenu> </DropdownMenu>
); );
}; };

View file

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