import { useRef } from "react"; import { Button } from "./ui"; import { CloseIcon, CropIcon, ImagePlusIcon, ResetIcon } from "./icons"; interface TopBarProps { hasImage: boolean; onFile: (file: File) => void; onResetEdits: () => void; onClose: () => void; } export function TopBar({ hasImage, onFile, onResetEdits, onClose }: TopBarProps) { const inputRef = useRef(null); return (

wimp

web image manipulation

100% local ยท nothing uploaded {hasImage && ( <> )}
{ const file = e.target.files?.[0]; if (file) onFile(file); e.target.value = ""; }} />
); }