Created
May 21, 2020 21:35
-
-
Save yoavniran/8ef82cf69b02c9c4eb04543dc43ff0d8 to your computer and use it in GitHub Desktop.
React-Uploady preview with progress demo - UploadWithProgressPreview.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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