Skip to content

Commit c2c1ffd

Browse files
committedApr 27, 2017
Update readme
1 parent 12d1c3d commit c2c1ffd

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
 

Diff for: ‎README.md

+52
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
11
# 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+
26
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/.

0 commit comments

Comments
 (0)
Please sign in to comment.