-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add 'getPreviewIcon' to DropzoneArea #154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @max-carroll ,
Thanks for the PR, looks good but I marked some possible changes.
Hi there @panz3r I want to fix this now, I will work on fork, should this be as a new commit, or should I modify the old commit, can you help me with the workflow a bit please? |
Hi @max-carroll , I'd try to keep it in the old commit, also (since you'll have to
(You'll need to force push afterward but that's ok) |
Thanks for your guidance on git rebase interactive, I have now learnt how to do this and done it. My work has been force pushed to the branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Going to merge this into Usually the workflow for the backport is as easy as:
|
Description
I have created a new prop
getPreviewIcon
which allows you to pass your own function which determines which Preview Icon should be displayed for selected file.I also added an example in the markdown as this was useful for testing, and thought it would also be useful so that people can see how to use the prop and a possible use case for it
Type of change
How Has This Been Tested
getPreviewIcon
prop I verified that an image file dragged on would display the image preview, as per beforegetPreviewIcon
prop I verified that a file type which wasn't an image dragged on would display a paper clip icon, as per beforeTest Configuration:
Windows 10, Chrome Browser
Checklist
There is a linting error, not sure how to get around this, any ideas?
There appears to be no testing framework in place
n/a see above
n/a