mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Gestion des pièces à fournir par les parents (configuration école)
This commit is contained in:
@ -3,6 +3,11 @@ import { PhoneInput } from 'react-international-phone';
|
||||
import 'react-international-phone/style.css';
|
||||
|
||||
export default function InputPhone({ name, label, value, onChange, errorMsg, className, required }) {
|
||||
const handlePhoneChange = (phone) => {
|
||||
// Appeler onChange avec un objet personnalisé
|
||||
onChange({ target: { name, value: phone } });
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`${className}`}>
|
||||
<label htmlFor={name} className="block text-sm font-medium text-gray-700">
|
||||
@ -13,7 +18,7 @@ export default function InputPhone({ name, label, value, onChange, errorMsg, cla
|
||||
<PhoneInput
|
||||
defaultCountry="fr"
|
||||
value={value}
|
||||
onChange={(phone) => onChange(phone)}
|
||||
onChange={handlePhoneChange}
|
||||
inputProps={{
|
||||
name: name,
|
||||
required: required,
|
||||
|
||||
Reference in New Issue
Block a user