Spaces:
Running
Running
File size: 1,394 Bytes
1d8be9a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import { FileImage, FolderUp, ImagePlus, ShieldCheck, Sparkles } from "lucide-react";
type UploadPanelProps = {
onBrowse: () => void;
isDragging: boolean;
};
export function UploadPanel({ onBrowse, isDragging }: UploadPanelProps) {
return (
<div
className={`upload-dropzone${isDragging ? " is-dragging" : ""}`}
onDragOver={(event) => event.preventDefault()}
>
<div className="upload-icon-wrap"><ImagePlus size={24} strokeWidth={1.6} /></div>
<p className="upload-kicker">YOUR NEXT GREAT IMAGE STARTS HERE</p>
<h3>Enhance your image with AI</h3>
<p className="upload-description">Upload a blurry or low-resolution image and let AI restore the details.</p>
<button className="button button-dark upload-button" type="button" onClick={onBrowse}>
<FolderUp size={17} /> Choose an image
</button>
<div className="upload-file-types" aria-label="Supported formats and file size">
<span>JPG</span><span>PNG</span><span>WEBP</span><i /> <span>Up to 20 MB</span>
</div>
<div className="upload-privacy"><ShieldCheck size={14} /> Used only for enhancement, never permanently stored.</div>
<div className="drop-hint"><FileImage size={14} /> Drop a file anywhere in this panel</div>
{isDragging && <div className="drop-overlay"><Sparkles size={20} /> Drop to add your image</div>}
</div>
);
}
|