File tree 1 file changed +52
-0
lines changed
1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1
1
# react-keyed-file-browser
2
+
3
+ [ ![ npm version] ( https://badge.fury.io/js/react-keyed-file-browser.svg )] ( http://badge.fury.io/js/react-keyed-file-browser )
4
+ ![ Downloads] ( http://img.shields.io/npm/dm/react-keyed-file-browser.svg?style=flat )
5
+
2
6
Folder based file browser given a flat keyed list of objects, powered by React.
7
+
8
+ ## Live Demo
9
+
10
+ Check out the live demo here: http://abasystems.github.io/react-keyed-file-browser/
11
+
12
+ ## Installation
13
+
14
+ Install the package with npm:
15
+
16
+ ```
17
+ npm install react-keyed-file-browser
18
+ ```
19
+
20
+ Then require and use with ES6 imports:
21
+
22
+ ``` javascript
23
+ import React from ' react'
24
+ import ReactDOM from ' react-dom'
25
+
26
+ import FileBrowser from ' react-keyed-file-browser'
27
+
28
+ var mount = document .querySelectorAll (' div.browser-mount' );
29
+ ReactDOM .render (
30
+ < FileBrowser
31
+ files= []
32
+ / > ,
33
+ mount[0 ]
34
+ );
35
+ ```
36
+
37
+ Optionally, include the built css with an import:
38
+
39
+ ``` scss
40
+ @import ' node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css' ;
41
+
42
+ ```
43
+
44
+ or tag:
45
+
46
+ ``` html
47
+ <link
48
+ href =" static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
49
+ rel =" stylesheet"
50
+ >
51
+ ```
52
+
53
+ Full reference documentation coming soon. For now, take a look at the reference implementation with
54
+ event handlers on the live demo at http://abasystems.github.io/react-keyed-file-browser/ .
You can’t perform that action at this time.
0 commit comments