Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 4b17d24

Browse files
committed
feat(maintenance): bumped version to 1.14.0 and updated the README.md.
1 parent 70112af commit 4b17d24

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@ Check out the live demo here: http://uptick.github.io/react-keyed-file-browser/
1414

1515
Install the package with npm:
1616

17-
```
17+
```bash
18+
# NPM
1819
npm install react-keyed-file-browser
20+
21+
# Yarn
22+
yarn add react-keyed-file-browser
1923
```
2024

21-
Then require and use with ES6 imports:
2225

2326
```javascript
2427
import React from 'react'
2528
import ReactDOM from 'react-dom'
2629

2730
import FileBrowser from 'react-keyed-file-browser'
2831

29-
var mount = document.querySelectorAll('div.browser-mount');
3032
ReactDOM.render(
3133
<FileBrowser
3234
files={[]}
3335
/>,
34-
mount[0]
36+
document.getElementById('root')
3537
);
3638
```
3739

@@ -77,11 +79,18 @@ Optionally, include the built css with an import:
7779

7880
```scss
7981
@import 'node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css';
80-
8182
```
83+
or tag:
8284

83-
Optionally, use your own React DND Provider:
85+
```html
86+
<link
87+
href="static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
88+
rel="stylesheet"
89+
>
90+
```
91+
## Examples
8492

93+
Using a custom drag and drop provider.
8594
```javascript
8695
import { RawFileBrowser } from 'react-keyed-file-browser'
8796

@@ -93,14 +102,6 @@ import { HTML5Backend } from 'react-dnd-html5-backend'
93102
</DndProvider>
94103
```
95104

96-
or tag:
97-
98-
```html
99-
<link
100-
href="static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
101-
rel="stylesheet"
102-
>
103-
```
104105

105106
Full reference documentation coming soon. For now, take a look at the reference implementation with
106107
event handlers on the live demo at http://uptick.github.io/react-keyed-file-browser/.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-keyed-file-browser",
3-
"version": "1.13.1",
3+
"version": "1.14.0",
44
"description": "Folder based file browser given a flat keyed list of objects, powered by React.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)