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

Commit

Permalink
feat(maintenance): bumped version to 1.14.0 and updated the README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
dreadera committed Dec 3, 2021
1 parent 70112af commit 4b17d24
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,26 @@ Check out the live demo here: http://uptick.github.io/react-keyed-file-browser/

Install the package with npm:

```
```bash
# NPM
npm install react-keyed-file-browser

# Yarn
yarn add react-keyed-file-browser
```

Then require and use with ES6 imports:

```javascript
import React from 'react'
import ReactDOM from 'react-dom'

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

var mount = document.querySelectorAll('div.browser-mount');
ReactDOM.render(
<FileBrowser
files={[]}
/>,
mount[0]
document.getElementById('root')
);
```

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

```scss
@import 'node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css';

```
or tag:

Optionally, use your own React DND Provider:
```html
<link
href="static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
rel="stylesheet"
>
```
## Examples

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

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

or tag:

```html
<link
href="static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
rel="stylesheet"
>
```

Full reference documentation coming soon. For now, take a look at the reference implementation with
event handlers on the live demo at http://uptick.github.io/react-keyed-file-browser/.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-keyed-file-browser",
"version": "1.13.1",
"version": "1.14.0",
"description": "Folder based file browser given a flat keyed list of objects, powered by React.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 4b17d24

Please sign in to comment.