mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 16:25:51 +01:00
feat(react/dialogs): port upload attachments
This commit is contained in:
13
apps/client/src/widgets/react/FormFileUpload.tsx
Normal file
13
apps/client/src/widgets/react/FormFileUpload.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user