From a7b30d8bfb572dad7b1c7998ce37dd7ea3aae9d2 Mon Sep 17 00:00:00 2001 From: Seok93 Date: Fri, 27 Sep 2024 17:00:00 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20#115=20FileDropZone=20accept=20props=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/FileDropZone.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/common/FileDropZone.tsx b/src/components/common/FileDropZone.tsx index adc56c6d..bc82ff4e 100644 --- a/src/components/common/FileDropZone.tsx +++ b/src/components/common/FileDropZone.tsx @@ -6,6 +6,7 @@ type FileDropZoneProps = { id: string; label: string; files: FileInfo[]; + accept: string; onFileDrop: (e: React.DragEvent) => void; onFileChange: (e: React.ChangeEvent) => void; onFileDeleteClick: (fileId: string) => void; @@ -14,11 +15,11 @@ type FileDropZoneProps = { const DEFAULT_BG_COLOR = 'inherit'; const FILE_DRAG_OVER_BG_COLOR = '#e1f4d9'; -// ToDo: 파일 업로드 API 작업시 구조 다시 한 번 확인해보기 export default function FileDropZone({ id, label, files, + accept = '*', onFileDrop, onFileChange: handleFileChange, onFileDeleteClick: handleFileDeleteClick, @@ -41,7 +42,15 @@ export default function FileDropZone({ return (