So I can say import, and then inside of a string. So you can import these manually by providing a path to it. If you scroll all the way to the right, you'll see that this contains literally hundreds if not thousands of specific CSS rules, so that's why we're importing it instead of having to write all of those ourselves. So this is gonna be the file that we're gonna be importing, and you may say that's just one line, it's because it's been minified. And then inside of dist, you're gonna want to go to min, and then once in min,. And once we get down to where it gives us our one for Dropzone, as you can see right here, then you're gonna wanna go to the dist directory. So keep on going down, thankfully they are in alphabetical order. And you don't have to perform this first step, I'm simply showing you where we're performing the import so that it doesn't feel just like magic, like we're pulling these stylesheets out of thin air, so we are pulling them directly from the node modules. So if you go to your node modules directory and open it up and then scroll all the way down to where we go to Dropzone, so we're gonna be pulling in two files. So you can manually import stylesheets in React by doing this, and I'm gonna show you visually, and I'm also going to type it in. So we need to import those, and I will show you how you can do that. Those don't come out of nowhere, those are just stored in a stylesheet somewhere. Now, this is something we have not had to do so far in this course, but because Dropzone has a number of specific types of styles, so if you come over and you look at what we're going to generate, you can see we have these icons, we have the ability to render a preview just like this. I would be interested in seeing what you're trying to accomplish, but that's a different conversation.Import DropzoneComponent from " react-dropzone-component " Īnd then after that, we also need to manually import some stylesheets. I hope I have helped you make a decision! or at the least gave you enough input to accept that you're going the right way. I am working on a project that allows cropping (and potentially re-sizing) of images, but I'm struggling with a potential bug that I'm waiting to hear back from. I only use DropzoneJS because I only need the ability to drag and drop files and upload them to the server without being edited. I imagine it is possible to do what you want, but I feel like you will end up recreating a few wheels from FileDrop and/or file-input. I'm guessing right now that DropzoneJS is not the right one this time. In the end deciding on the perfect library for your project falls to you. The file-input part doesn't seem necessary for me, but I have not seen your iteration of using it. It would be interesting to say that DropzoneJS could potentially move to something like that, but I doubt that is a goal of enyo or anyone in this specific community. If you're trying to edit the file contents and then possibly send those new contents to the server to then be downloaded by the client that is a completely different type of functionality. It is more of being able to edit the contents of the provided file. The FileDrop from chrismbarr is a different type of file drop. So I want to say DropzoneJS is all you need and setting up the options to fit your needs would be best for you, but now I don't know what you want. Out of curiosity are you not going to upload the files to the server at some point?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |