Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
React-Uploady preview with progress demo - UploadWithProgressPreview.jsx
import UploadButton from "@rpldy/upload-button";
import UploadPreview from "@rpldy/upload-preview";
import CustomImagePreview from "./CustomImagePreview";
const UploadWithProgressPreview = () => {
const getPreviewProps = useCallback(item => ({ id: item.id }), []);
return (
<>
<UploadButton>Upload Files</UploadButton>
<br />
<UploadPreview
previewComponentProps={getPreviewProps}
PreviewComponent={CustomImagePreview}
/>
</>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment