This repository has been archived on 2026-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Hayden Hargreaves 92e02a821c (FIX): Fixed the silly rendering of selected bug.
I need to rewrite this POS. The codebase sucks.
2025-05-29 20:57:38 -07:00

27 lines
861 B
JavaScript

import Directory from "./Directory.jsx";
/**
* Display the directories in the current path.
* @param diretories {string[]} - Children of the path.
* @param showHidden {boolean} - Display hidden items.
* @param appendPath {function(string)} - Function to add a child to the path.
* @param toggleSelected {function(string)} - Function to toggle selection status.
* @param selected {string[]} - List of selected names.
* @constructor
*/
export default function DirectoryList({ dirs, showHidden, appendPath, toggleSelected, toggleEditing, selected }) {
return <>
{dirs.map((dir, idx) =>
<Directory
key={idx}
entry={dir}
selected={selected.includes(dir.name)}
showHidden={showHidden}
appendPath={appendPath}
toggleSelected={toggleSelected}
toggleEditing={toggleEditing} />
)}
</>
}