react-filetree-electron
$3
Screenshot
!React Filetree Electron Demo
Installation
* Note: requires node version >= 6 and an npm version >= 3.
``bash
npm install react-filetree-electron
`
$3
`bash
yarn add react-filetree-electron
`
Use
`js
import FileTree from 'react-filetree-electron';
`
$3
`jsx
const directory = '/Users/Your-Name-Here/Directory'
``
FileTree Props
$3
| Property | Type | Options [default] | Description |
| :--------------- |:--------:| :----------------------------------------------: | :------------------------------------------------------------------------------------------ |
| directory | string | | The directory that acts as the tree root. |
| onFileClick | function | | A function to be performed when a user clicks a file list item (not a directory list item). |
| directoryTheme | string | ['light'], 'dark' | Theme for the directory icon |
| fileTreeStyle | object | [{ fontFamily: 'sans-serif', listStyle: 'none' }] | Merge or change style attributes for the overall file tree |
| directoryStyle | object | [{ marginBottom: 3 }] | Merge or change style attributes for the directory list items |
| fileStyle | object | [{ marginBottom: 3 }] | Merge or change style attributes for the file list items |
Special Thanks
* react-electron-boilerplate was used for the example and for development purposes (https://github.com/chentsulin/electron-react-boilerplate)
License
MIT