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

Change the message content? #13

Open
ghost opened this issue Apr 5, 2018 · 4 comments
Open

Change the message content? #13

ghost opened this issue Apr 5, 2018 · 4 comments
Labels
enhancement Modification to an existing feature
Projects

Comments

@ghost
Copy link

ghost commented Apr 5, 2018

It's a pretty good. But is there anyway to custom the content message for localization purpose? Thanks!

@spruce-bruce
Copy link
Contributor

spruce-bruce commented Apr 5, 2018

Not currently!

This would be a pretty easy update though - we can add an optional prop called customMessages that takes a shape like this:

{
  instructions: 'Drag-n-drop a file or click to add an image',
  acceptedFileTypes: 'Accepted file types',
  maxFileSize: 'Max file size',
  fileTypeErrorMessage: 'Invalid file type',
  fileSizeErrorMessage: 'File size must be less than $BYTES',
}

then update the code to use those messages if provided

@ghost
Copy link
Author

ghost commented Apr 5, 2018

I've seen your source code and solved this already. I've also add clear image feature and custom error messages. Can I contribute?

@spruce-bruce
Copy link
Contributor

Sure submit a PR and we'll take a look!

@synbot synbot added this to Release Backlog in v0.3.0 Apr 5, 2018
dmmcinty added a commit that referenced this issue Apr 5, 2018
@synbot synbot removed this from Release Backlog in v0.3.0 Dec 19, 2018
@synbot synbot added this to Dev: In Process in v0.3.0 Dec 19, 2018
@bobeagan bobeagan added the enhancement Modification to an existing feature label Apr 6, 2020
@dmmcinty dmmcinty moved this from Dev: In Process to Dev: Ready in v0.3.0 May 14, 2020
@mkc2019
Copy link

mkc2019 commented Apr 23, 2021

Is this feature not available at master branch yet? Only in v0.3.0 branch so far?
Edit:
Hey after looking at the source code I realized you have a props known as "instructions" which allow user to change the content inside the "Drop n Crop" box! Perhaps you can add this to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Modification to an existing feature
Projects
v0.3.0
Dev: Ready
Development

No branches or pull requests

4 participants