sforkowany z mirror/soapbox
Improve display of PhoneInput
rodzic
85cf99f618
commit
0ed1c3ca83
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ const PhoneInput: React.FC<IPhoneInput> = (props) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<HStack>
|
||||
<HStack alignItems='center'>
|
||||
<CountryCodeDropdown
|
||||
countryCode={countryCode}
|
||||
onChange={handleCountryChange}
|
||||
|
|
Ładowanie…
Reference in New Issue