This project was bootstrapped with Create React App.
User can render a Folder tree component on the screen by editing json in a specific format.
User can show contains inside folder by click the folder, and hide all contains by click a again.
User can render a Folder tree component on the screen by editing ../src/data/basicTree.json
.
Basic Structure of basicTree.JSON is an array.Inside this array, user can layout any number of Folder
and File
.
[{Folder},{Folder},......,{File},{File},.....]
Format of Folder
Folder
and File
, set it as an array.//Example of "Folder" object format { "id": "v-OOyNYe8R", "icon": "folder", "label": "public", "color": "", "type": "Folder", "child": [{Folder},......,{File},.....] }
Format of File
//Example of "File" object format { "id": "nKXz5hxEDI", "icon": "fa-brands fa-js", "label": "index", "color": "", "type": "File", "fileExtension":"js" }
User can set icon of file whatever they want. Please check icon code on Font Awesome.
Available Icon List
:
If icon code do not work, please edit App.js as following code:
//App.js Line 6 import { import { faFolder, faFolderOpen, faFile, faFileCode, faFileImage, // import icon you want here: "addIcon" } from "@fortawesome/free-solid-svg-icons"; } from "@fortawesome/free-solid-svg-icons"; //Line 14 //add icon you import into this function library.add(fab, faFolder, faFolderOpen, faFile, faFileCode, faFileImage, "addIcon");