Checkpoint: Correction de l'affichage des labels des pièces jointes qui apparaissaient en double. Ajout d'un prop label au composant FileUpload pour personnaliser le texte. Déployé sur le VPS.
This commit is contained in:
@@ -21,9 +21,10 @@ interface FileUploadProps {
|
||||
} | null) => void;
|
||||
accept?: string;
|
||||
maxSize?: number; // en Mo
|
||||
label?: string; // Label personnalisé
|
||||
}
|
||||
|
||||
export function FileUpload({ value, onChange, accept, maxSize = 10 }: FileUploadProps) {
|
||||
export function FileUpload({ value, onChange, accept, maxSize = 10, label = "Pièce jointe (optionnel)" }: FileUploadProps) {
|
||||
const [uploading, setUploading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
@@ -84,7 +85,7 @@ export function FileUpload({ value, onChange, accept, maxSize = 10 }: FileUpload
|
||||
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<Label>Pièce jointe (optionnel)</Label>
|
||||
<Label>{label}</Label>
|
||||
|
||||
{!value ? (
|
||||
<div className="space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user