From 18b71ca2f2fe6658c159e34635e99d0166b9d263 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Thu, 11 Sep 2025 13:27:55 +0530 Subject: [PATCH] (feat:upload) cards for upload types --- frontend/src/assets/crawler.svg | 3 + frontend/src/assets/drive.svg | 3 + frontend/src/assets/file_upload.svg | 13 +- frontend/src/assets/github.svg | 6 +- frontend/src/assets/reddit.svg | 4 + frontend/src/assets/url.svg | 3 + frontend/src/components/FilePicker.tsx | 25 ++-- frontend/src/components/Input.tsx | 12 +- frontend/src/components/types/index.ts | 1 + frontend/src/modals/WrapperModal.tsx | 4 +- frontend/src/upload/Upload.tsx | 168 +++++++++++++++---------- 11 files changed, 150 insertions(+), 92 deletions(-) create mode 100644 frontend/src/assets/crawler.svg create mode 100644 frontend/src/assets/drive.svg create mode 100644 frontend/src/assets/reddit.svg create mode 100644 frontend/src/assets/url.svg diff --git a/frontend/src/assets/crawler.svg b/frontend/src/assets/crawler.svg new file mode 100644 index 00000000..863405ad --- /dev/null +++ b/frontend/src/assets/crawler.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/drive.svg b/frontend/src/assets/drive.svg new file mode 100644 index 00000000..8ec4dc9b --- /dev/null +++ b/frontend/src/assets/drive.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/file_upload.svg b/frontend/src/assets/file_upload.svg index 159b580d..cb945f1a 100644 --- a/frontend/src/assets/file_upload.svg +++ b/frontend/src/assets/file_upload.svg @@ -1,3 +1,10 @@ - - - \ No newline at end of file + + + + + + + + + + diff --git a/frontend/src/assets/github.svg b/frontend/src/assets/github.svg index 40fc238c..db294339 100644 --- a/frontend/src/assets/github.svg +++ b/frontend/src/assets/github.svg @@ -1,5 +1,3 @@ - - github - - + + diff --git a/frontend/src/assets/reddit.svg b/frontend/src/assets/reddit.svg new file mode 100644 index 00000000..705ef638 --- /dev/null +++ b/frontend/src/assets/reddit.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/assets/url.svg b/frontend/src/assets/url.svg new file mode 100644 index 00000000..e51397f0 --- /dev/null +++ b/frontend/src/assets/url.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/components/FilePicker.tsx b/frontend/src/components/FilePicker.tsx index 8c95c6a2..453b994d 100644 --- a/frontend/src/components/FilePicker.tsx +++ b/frontend/src/components/FilePicker.tsx @@ -7,6 +7,7 @@ import FileIcon from '../assets/file.svg'; import FolderIcon from '../assets/folder.svg'; import CheckIcon from '../assets/checkmark.svg'; import SearchIcon from '../assets/search.svg'; +import Input from './Input'; interface CloudFile { id: string; @@ -361,20 +362,16 @@ export const FilePicker: React.FC = ({ {/* Search input */}
-
- handleSearchChange(e.target.value)} - className="w-full px-3 py-2 pr-10 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" - /> - -
+ handleSearchChange(e.target.value)} + colorVariant="silver" + borderVariant="thin" + labelBgClassName="bg-white dark:bg-charleston-green-2" + leftIcon={Search} + />
diff --git a/frontend/src/components/Input.tsx b/frontend/src/components/Input.tsx index dbc517cb..b9f9d93a 100644 --- a/frontend/src/components/Input.tsx +++ b/frontend/src/components/Input.tsx @@ -16,6 +16,7 @@ const Input = ({ textSize = 'medium', children, labelBgClassName = 'bg-white dark:bg-raisin-black', + leftIcon, onChange, onPaste, onKeyDown, @@ -42,7 +43,7 @@ const Input = ({
{children} + {leftIcon && ( +
+ {leftIcon} +
+ )} {placeholder && (