From 139cc8737df5f6f9d37fcdf5874b616f978fc459 Mon Sep 17 00:00:00 2001 From: Tania Gutierrez Date: Mon, 11 Mar 2024 23:41:49 -0400 Subject: [PATCH] Added fullWidth and leftIcon properties to input and finished FileManager design --- app/components/ui/input.tsx | 17 +++-- app/routes/file-manager/route.tsx | 104 ++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 app/routes/file-manager/route.tsx diff --git a/app/components/ui/input.tsx b/app/components/ui/input.tsx index 43e8c91..1eae76b 100644 --- a/app/components/ui/input.tsx +++ b/app/components/ui/input.tsx @@ -4,10 +4,13 @@ import { cn } from "~/utils" import { EyeOpenIcon, EyeNoneIcon } from "@radix-ui/react-icons" export interface InputProps - extends React.InputHTMLAttributes {} + extends React.InputHTMLAttributes { + fullWidth: boolean, + leftIcon?: React.ReactNode + } const Input = React.forwardRef( - ({ className, type, ...props }, ref) => { + ({ className, type, fullWidth, leftIcon, ...props }, ref) => { const [showPassword, setShowPassword] = React.useState(false) const [mask, setMask] = React.useState(false) const toggleShowPassword = () => { @@ -15,12 +18,18 @@ const Input = React.forwardRef( setMask((mask) => !mask) } return ( -
+
+ {leftIcon && ( +
+ {leftIcon} +
+ )} +

File Manager

+ + + + + + +

Files

+
+ } + placeholder="Search files by name or CID" + className="border-ring font-bold w-full grow h-12 flex-1" + /> + + +
+ + + ); +} + +const AddIcon = ({ className }: { className?: string }) => { + return ( + + + + + + + + + + + ); +};