Skip to content
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

Property to Change the Dropzone Icon #48

Closed
nabsta-eth opened this issue May 3, 2019 · 4 comments · Fixed by #227
Closed

Property to Change the Dropzone Icon #48

nabsta-eth opened this issue May 3, 2019 · 4 comments · Fixed by #227
Milestone

Comments

@nabsta-eth
Copy link

nabsta-eth commented May 3, 2019

How do I change the icon to use the CloudUploadOutlined icon in the dropzone for consistency within my app? Maybe introduce a prop for it?

@nabsta-eth nabsta-eth changed the title Change the Dropzone Icon Property to Change the Dropzone Icon May 4, 2019
@Yuvaleros
Copy link
Owner

What would you think would be a good solution here? a property that receives a path? or maybe it should receive a Material UI icon component?

@max-carroll
Copy link
Contributor

max-carroll commented Apr 15, 2020

well you could have it passed in as a prop, and because you will want to set the classes on it you can probably pass those in as props using React.createElement

const icon = React.createElement(this.props.customIcon, { className: classes.uploadIconSize }); |

DropzoneArea.defaultProps = {
...
customIcon: CloudUploadIcon

and have the default props as CloudUploadIcon , just an idea,

This would also cater for a scenario for if they want to use and Svg Icon or a font awesome Icon,

@panz3r
Copy link
Contributor

panz3r commented Apr 15, 2020

Hi @max-carroll ,

Thanks for your suggestion, currently there's an open PR #110 implementing this feature as you suggested.

I'll review it as soon as possible.

@max-carroll
Copy link
Contributor

Ahh I've already implemented it on my side, didn;t realise that 🤣, ill review

@panz3r panz3r modified the milestones: 3.3, 3.4 Jun 17, 2020
@panz3r panz3r mentioned this issue Aug 1, 2020
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants