From e5419a037c30fd7b9235cba59ca16b014947d834 Mon Sep 17 00:00:00 2001 From: Chiedo Date: Wed, 3 Jun 2015 10:26:30 -0400 Subject: [PATCH] Improved README and added the option to add child elements --- README.md | 19 +++++++++++++++++++ src/dropzone.js | 1 + 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index f436588..d7f04e7 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,25 @@ var simpleCallBack = function () { }; ``` +The djsconfig prop is compatible with all of the options on the official Dropzonejs page. Updating the preview template is more tricky but can be done as follows. + +```js +var djsConfig = { + previewTemplate: React.renderToStaticMarkup( +
+
+
+ +
+
+
+
+
+
+ ) +} +``` + ## Server Example This component comes with a small server example. To try it out, simply run `npm install` and then `grunt` from the component's folder. Visit `http://localhost:8000/example/` to see the uploads working. diff --git a/src/dropzone.js b/src/dropzone.js index 3be7c7d..08fb17d 100644 --- a/src/dropzone.js +++ b/src/dropzone.js @@ -82,6 +82,7 @@ DropzoneComponent = React.createClass({ return (
{icons} + {this.props.children}
); },