feat(react/dialogs): port upload attachments

This commit is contained in:
Elian Doran
2025-08-05 23:03:38 +03:00
parent f196a78728
commit 2a40d6bb7e
12 changed files with 103 additions and 129 deletions

View File

@@ -0,0 +1,13 @@
interface FormFileUploadProps {
onChange: (files: FileList | null) => void;
multiple?: boolean;
}
export default function FormFileUpload({ onChange, multiple }: FormFileUploadProps) {
return (
<label class="tn-file-input tn-input-field">
<input type="file" class="form-control-file" multiple={multiple}
onChange={e => onChange((e.target as HTMLInputElement).files)} />
</label>
)
}