From eed8c04fdbd2da08867a21e05b91569bd2d410d0 Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Tue, 17 Dec 2024 16:18:53 +0800 Subject: [PATCH] Added accept parameter to FileUpload component --- apps/admin-x-design-system/src/global/form/FileUpload.tsx | 5 +++-- .../advanced/migrationtools/UniversalImportModal.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/admin-x-design-system/src/global/form/FileUpload.tsx b/apps/admin-x-design-system/src/global/form/FileUpload.tsx index 02218ab843..8f1711f002 100644 --- a/apps/admin-x-design-system/src/global/form/FileUpload.tsx +++ b/apps/admin-x-design-system/src/global/form/FileUpload.tsx @@ -16,9 +16,10 @@ export interface FileUploadProps { style?: CSSProperties; unstyled?: boolean; inputRef?: React.RefObject; + accept?: string; } -const FileUpload: React.FC = ({id, onUpload, children, style, unstyled = false, inputRef, className, dragIndicatorClassName, ...props}) => { +const FileUpload: React.FC = ({id, onUpload, children, style, unstyled = false, inputRef, className, dragIndicatorClassName, accept, ...props}) => { const [fileKey, setFileKey] = useState(Date.now()); const [isDragging, setIsDragging] = useState(false); @@ -52,7 +53,7 @@ const FileUpload: React.FC = ({id, onUpload, children, style, u return (