Yuvaleros / material-ui-dropzone

A Material-UI file upload dropzone
MIT License
483 stars 248 forks source link

Support MUI v5; removal of "@mui/styles" dependency; TypeScript rewrite; #338

Open Deckstar opened 2 years ago

Deckstar commented 2 years ago

Description

Previous pull requests to update to MUI v5 mostly just changed imports. In this PR I also removed the dependency on "@mui/styles" in favor of the new styled API of MUI v5.

At the same time I also rewrote the entire library to be written in TypeScript, and to be compiled with TSC instead of Rollup. This was a very big change, but it seemed to me like unfortunately this library is quite dead? šŸ˜… (I assume so because at the time of writing there haven't been any updates since September 2020, which was over a year ago, and there is a plethora of open issues and pull requests).

I based my fork on this fork by Steven Hazel, which was the v5 update that I previously used in my own project.

Since I assume that this PR won't be merged for a long time (or, more likely, ever), I've published my changes as my own package under "mui-file-dropzone".

Thanks for reading. This library was great and I hope that my changes can be useful for somebody! šŸ˜„

Type of change

How Has This Been Tested

Warning! So far I haven't tested this rewrite at all. Caveat emptor!

Checklist

bil4aug commented 2 years ago

How much time this PR will take to be merged.

zzeni commented 1 year ago

Thanks @Deckstar , it works for me šŸŽ‰ šŸš€ !

My app's setup is:

(Btw, please note that the README should reflect the changes to DropzoneArea's interface).

For anyone else, who's like to try @Deckstar's solution:

yarn add material-ui-dropzone@https://github.com/Deckstar/material-ui-dropzone