Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-keyed-file-browser
Advanced tools
Readme
Folder based file browser given a flat keyed list of objects, powered by React.
Check out the live demo here: http://uptick.github.io/react-keyed-file-browser/
Install the package with npm:
# NPM
npm install react-keyed-file-browser
# Yarn
yarn add react-keyed-file-browser
import React from 'react'
import ReactDOM from 'react-dom'
import FileBrowser from 'react-keyed-file-browser'
ReactDOM.render(
<FileBrowser
files={[]}
/>,
document.getElementById('root')
);
Include icons from FontAwesome 4:
import React from 'react'
import ReactDOM from 'react-dom'
import FileBrowser, { Icons } from 'react-keyed-file-browser'
// this imports the FontAwesome Icon Styles
import 'font-awesome/css/font-awesome.min.css'
var mount = document.querySelectorAll('div.browser-mount');
ReactDOM.render(
<FileBrowser
files={[]}
icons={Icons.FontAwesome(4)}
/>,
mount[0]
);
or your own icons by specifying as so:
<FileBrowser
files={[]}
icons={{
File: <i className="file" aria-hidden="true" />,
Image: <i className="file-image" aria-hidden="true" />,
PDF: <i className="file-pdf" aria-hidden="true" />,
Rename: <i className="i-cursor" aria-hidden="true" />,
Folder: <i className="folder" aria-hidden="true" />,
FolderOpen: <i className="folder-open" aria-hidden="true" />,
Delete: <i className="trash" aria-hidden="true" />,
Loading: <i className="circle-notch spin" aria-hidden="true" />,
}}
/>
Optionally, include the built css with an import:
@import 'node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css';
or tag:
<link
href="static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
rel="stylesheet"
>
Using a custom drag and drop provider.
import { RawFileBrowser } from 'react-keyed-file-browser'
import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
<DndProvider backend={HTML5Backend}>
<RawFileBrowser files={[]}/>
</DndProvider>
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/.
FAQs
Folder based file browser given a flat keyed list of objects, powered by React.
The npm package react-keyed-file-browser receives a total of 3,264 weekly downloads. As such, react-keyed-file-browser popularity was classified as popular.
We found that react-keyed-file-browser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.