diff --git a/src/components/ui/file-upload.tsx b/src/components/ui/file-upload.tsx index 713e8be..fe077aa 100644 --- a/src/components/ui/file-upload.tsx +++ b/src/components/ui/file-upload.tsx @@ -7,10 +7,12 @@ export interface FileUploadProps extends Omit( - ({ className, onFileSelect, accept, label, description, ...props }, ref) => { + ({ className, onFileSelect, accept, label, description, variant = "default", ...props }, ref) => { const [file, setFile] = React.useState(null) const [dragActive, setDragActive] = React.useState(false) const inputRef = React.useRef(null) @@ -48,10 +50,15 @@ export const FileUpload = React.forwardRef( } } + const isCompact = variant === "compact" + return (
( onChange={handleChange} {...props} /> -
-
- +
+
+
{file ? ( - <> -

{file.name}

+
+

{file.name}

{(file.size / 1024 / 1024).toFixed(2)} MB

- +
) : ( <> -

- {label || "Drag & Drop Video Here"} -

-

- {description || "or click to browse files"} -

+
+

+ {label || "Drag & Drop Video Here"} +

+

+ {description || "or click to browse files"} +

+
diff --git a/src/layouts/AppLayout.tsx b/src/layouts/AppLayout.tsx index dc55c1e..0e710e5 100644 --- a/src/layouts/AppLayout.tsx +++ b/src/layouts/AppLayout.tsx @@ -34,7 +34,7 @@ export function AppLayout() { }`} > -
+