optimizely-axiom / optiaxiom

https://optimizely-axiom.github.io/optiaxiom/
Apache License 2.0
4 stars 7 forks source link

Add `FileUpload` Component #87

Open ImperishableMe opened 3 weeks ago

ImperishableMe commented 3 weeks ago

Add a FileUploader Component that can be wrapped around a children to give it drag and drop functionality i.e. it will detect any drag and drop events.

We can also provide some customization options such as:

For the initial version however, maybe we can skip the customisation and provide the basic functionalities.

ImperishableMe commented 3 weeks ago

@radnan bhaia, can you please assign this to me? And also, please let me know if the Issue details look reasonable to you.

radnan commented 2 weeks ago

instead of dragAndDrop boolean - we can add an onDrop prop. so by default users can both click to upload a file - or drag and drop files - no reason to toggle dnd in any way.

radnan commented 2 weeks ago

feel free to use a third party app like https://react-dropzone.js.org/ to make things easier

radnan commented 2 weeks ago

ideally we should also support the following props - but for now just multiple is good enough

radnan commented 1 week ago

Not sure if you've started on this already or not - but another good option is https://ark-ui.com/react/docs/components/file-upload since radix-ui doesn't have it yet

ImperishableMe commented 1 week ago

Not sure if you've started on this already or not - but another good option is https://ark-ui.com/react/docs/components/file-upload since radix-ui doesn't have it yet

I am having a look at this bhai. I was OOO for some days.