react-drag-drop-files
react-drag-drop-files copied to clipboard
Dropzone size
Hi, I am new in frontend, first thanks for your library, its so handy. I have tried to change the size of the dropzone and icon but it does not work, maybe someone could give me a hint? thanks!
Hi,
You need to add a children prop with a JSX element that is custom styled for the drop area. Something like:
<FileUploader
multiple={false}
handleChange={handleChange}
name="file"
types={fileTypes}
children={boxArea}
/>
Where const boxArea = <div className='dropArea'>Add file </div>
You can then style the class dropArea how ever you want in your style sheet.
you can use the classes property.
classes="sample-class"
but you need to add !important to your changes as there are already default values.
ex:
.sample-class {
max-width: 100px !important;
min-width: 100px !important;
}