react-drag-drop-files icon indicating copy to clipboard operation
react-drag-drop-files copied to clipboard

Dropzone size

Open CoderShiun opened this issue 2 years ago • 1 comments

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!

CoderShiun avatar Jan 25 '23 08:01 CoderShiun

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.

cplanck avatar Jan 30 '23 21:01 cplanck

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;
}

KarimMokhtar avatar Oct 22 '24 22:10 KarimMokhtar