import React, { FC } from 'react'; import css from './index.module.css'; interface FieldProps { label: string; value: string; } export interface AccountInformationProps { email?: FieldProps; firstName?: FieldProps; lastName?: FieldProps; zip?: FieldProps; street?: FieldProps; additionalInformation?: FieldProps; city?: FieldProps; company?: FieldProps; streetNo?: FieldProps; phone?: FieldProps; } const AccountInformation: FC = ({ email, lastName, firstName, street, zip, city, company, streetNo, additionalInformation, phone, }) => (
{lastName && lastName.label}
{lastName && lastName.value}
{firstName && firstName.label}
{firstName && firstName.value}
{company && company.value && (
{company && company.label}
{company && company.value}
)}
{street && street.label}
{street && street.value}
{streetNo && streetNo.value && (
{streetNo && streetNo.label}
{streetNo && streetNo.value}
)}
{additionalInformation && additionalInformation.value && (
{additionalInformation && additionalInformation.label}
{additionalInformation && additionalInformation.value}
)}
{zip && zip.label}
{zip && zip.value}
{city && city.label}
{city && city.value}
{email && email.label}
{email && email.value}
{phone && phone.label}
{phone && phone.value}
); export default AccountInformation;