1.0.4 • Published 3 years ago

react-file-browser-component v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

A React File Browser Component

A reusable react component for browsing files in the web browser.

API

Click here for a example project.

Properties

NameTypeDescriptionExample
currentDirectorystringThe current directory of the file browser (displayed in header)/Users/
currentFilesarray of objects with keys: name, isFolder, dateModified, size, kindThe current files that are shown in the file browser{ name: 'example.pdf', isFolder: false, dateModified: 'Mon 7 Jun 2021', size: '123 KB', kind: 'Document' }
locationsarray of objects with keys: device, labelThe available locations (drives). Shown in the left side bar.{ device: 'C:', label: 'WinDrive' }
nextEnabledboolNext button in header is enabled or nottrue
previousEnabledboolPrevious button in header is enabled or nottrue
onFileClickcallback func with parameter: fileCallback for when a file is clicked in the table(file) => console.log(file)
onLocationClickcallback func with parameter: locationCallback for when a drive location is clicked(location) => console.log(location)
onNextClickcallback funcCallback for when next button is clicked() => console.log('next clicked')
onPreviousClickcallback funcCallback for when previous buttin is clicked() => console.log('previous is clicked')