lomi.
lomi. UI

Section informations client

Formulaire d'informations personnelles du checkout hébergé avec nom, e-mail, téléphone et WhatsApp optionnel.

Section informations client

Reprend customer-information-section.tsx du checkout hébergé : nom complet, e-mail, téléphone et numéro WhatsApp optionnel.

Aperçu

*
*
*
My WhatsApp number is different

Installation

Install to your codebase

Copy the component source with shadcn.

npx shadcn@latest add https://docs.lomi.africa/r/customer-information-section.json

Utilisation

import { CustomerInformationSection } from '@/components/lomi-ui/customer-information-section';

<CustomerInformationSection
  fullName={fullName}
  email={email}
  phoneNumber={phoneNumber}
  whatsappNumber={whatsappNumber}
  isDifferentWhatsApp={isDifferentWhatsApp}
  onFullNameChange={setFullName}
  onEmailChange={setEmail}
  onPhoneNumberChange={setPhoneNumber}
  onWhatsAppNumberChange={setWhatsAppNumber}
  onDifferentWhatsAppChange={setIsDifferentWhatsApp}
/>;

Nécessite react-phone-number-input dans votre application.

Props

PropTypeDescription
fullNamestringNom complet (contrôlé).
emailstringE-mail (contrôlé).
phoneNumberstringTéléphone au format E.164 (contrôlé).
whatsappNumberstringNuméro WhatsApp quand le champ est affiché.
isDifferentWhatsAppbooleanAffiche le champ WhatsApp au lieu de la ligne de bascule.
defaultCountryCountryPays par défaut du téléphone. Par défaut CI.
onFullNameChange(value: string) => voidHandler changement nom.
onEmailChange(value: string) => voidHandler changement e-mail.
onPhoneNumberChange(value?: string) => voidHandler changement téléphone.

Sur cette page