1 import type { ChangeEvent } from 'react';
3 import EmailInput from '@proton/components/components/input/EmailInput';
4 import { getAllFieldLabels } from '@proton/shared/lib/helpers/contacts';
5 import type { VCardProperty } from '@proton/shared/lib/interfaces/contacts/VCard';
8 vCardProperty: VCardProperty<string>;
9 onChange: (vCardProperty: VCardProperty) => void;
12 const ContactFieldEmail = ({ vCardProperty, onChange, ...rest }: Props) => {
13 const label = getAllFieldLabels().email;
15 const handleChange = ({ target }: ChangeEvent<HTMLInputElement>) => {
16 const newValue = target.value;
17 onChange({ ...vCardProperty, value: newValue });
22 value={vCardProperty.value}
24 onChange={handleChange}
31 export default ContactFieldEmail;