From 53d0f44d6028c44c0c72492dfb11d28574331176 Mon Sep 17 00:00:00 2001 From: Airike Jaska <95303654+airikej@users.noreply.github.com> Date: Thu, 5 Mar 2026 08:38:42 +0200 Subject: [PATCH] fix(file-dropzone): pass formlabel props to FormLabel #537 --- .../form/file-dropzone/file-dropzone.stories.tsx | 10 ++++++++++ .../components/form/file-dropzone/file-dropzone.tsx | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/tedi/components/form/file-dropzone/file-dropzone.stories.tsx b/src/tedi/components/form/file-dropzone/file-dropzone.stories.tsx index b0e17670..fd44021f 100644 --- a/src/tedi/components/form/file-dropzone/file-dropzone.stories.tsx +++ b/src/tedi/components/form/file-dropzone/file-dropzone.stories.tsx @@ -120,3 +120,13 @@ export const MultipleWithIndividualValidation: Story = { ), }; + +export const HasTooltip: Story = { + render: Template, + args: { + id: 'file-dropzone-tooltip', + name: 'file-tooltip', + label: 'Drop files here', + tooltip: 'Lorem ipsum', + }, +}; diff --git a/src/tedi/components/form/file-dropzone/file-dropzone.tsx b/src/tedi/components/form/file-dropzone/file-dropzone.tsx index bd49f42d..ea66cf67 100644 --- a/src/tedi/components/form/file-dropzone/file-dropzone.tsx +++ b/src/tedi/components/form/file-dropzone/file-dropzone.tsx @@ -38,7 +38,7 @@ export interface FileDropzoneProps extends Omit { const { getLabel } = useLabels(); - const { label = getLabel('file-dropzone.label'), className, disabled = false, helper, id } = props; + const { label = getLabel('file-dropzone.label'), className, disabled = false, helper, id, ...rest } = props; const { innerFiles, uploadErrorHelper, onFileChange, onFileRemove } = useFileUpload(props); const { getRootProps, getInputProps, isDragActive } = useDropzone({ @@ -78,7 +78,7 @@ export const FileDropzone = (props: FileDropzoneProps): JSX.Element => {
- +
{helper ? (