commit 66ad9339bfeca4c4d0d556174625840907e9a0f0 Author: arnaudDerbey Date: Mon Jul 1 19:26:04 2019 +0200 first upload diff --git a/cover.png b/cover.png new file mode 100644 index 0000000..0aeb042 Binary files /dev/null and b/cover.png differ diff --git a/dropzone.svelte b/dropzone.svelte new file mode 100644 index 0000000..ad20644 --- /dev/null +++ b/dropzone.svelte @@ -0,0 +1,71 @@ + + + + +
+ + +
diff --git a/index.svelte b/index.svelte new file mode 100644 index 0000000..208da76 --- /dev/null +++ b/index.svelte @@ -0,0 +1,36 @@ + + + + + + +

+ drop your file(s) here or click to add file +

+
+
diff --git a/package.json b/package.json new file mode 100644 index 0000000..8d2c99d --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "sv-dropzone", + "version": "1.0.1", + "description": "A simple && ssr ready wrapper around dropzone.JS for svelte/sapper.", + "keywords": [ + "svelte", + "sapper", + "dropzone", + "file upload" + ], + "main": "index.svelte", + "author": "Arnaud DERBEY", + "license": "MIT", + "dependencies": { + "dropzone": "^5.5.1" + } +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..632ff16 --- /dev/null +++ b/readme.md @@ -0,0 +1,54 @@ +# sv-dropzone + +sv-dropzone is a simple & ssr ready wrapper around [dropzoneJS] for [svelte] and [sapper]. +![cover](https://user-images.githubusercontent.com/2182637/53614150-efbed780-3c2c-11e9-9204-a5d2e746faca.gif) + +## Installation + +```bash +$ npm i sv-dropzone +``` + +## Usage + +```js + + + + +

hello

+
+ +``` + +## API + +| prop | default | type/structure | +| -------------- | -------------------------------------------------------------------------------------- | ------------------------------------- | +| dropzoneEvents | {} | object:{{ [eventName]: func}} | +| options | { previewTemplate: "`
`", dictDefaultMessage: "" } | object:{{ [optionName]: optionValue}} | +| dropzoneClass | "dropzone" | string | +| hooveringClass | "dropzone-hoovering" | string | +| id | "dropId" | string | +| autoDiscover | false | bool | +| slot | `

drop your file(s) here or click to add file

` | element | + +- All dropzone events can be found [here](https://www.dropzonejs.com/#events-list) +- All dropzone options can be found [here](https://www.dropzonejs.com/#configuration-options) + +[dropzonejs]: https://www.dropzonejs.com/ +[svelte]: https://svelte.dev/ +[sapper]: https://svelte.dev/ +[eventname]: https://www.dropzonejs.com/#events +[optionname]: https://www.dropzonejs.com/#configuration-options +[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"