mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
fix(file-manager): apply compact density to directory tree (#1478)
* fix(file-manager): apply compact density to directory tree * test(css): exercise the configured PostCSS plugin chain
This commit is contained in:
1 parent
2a2ba2f790
commit
322f811f2c
2 files changed
+9
-1
No files matched your search
@@ -79,6 +79,7 @@ export interface SidebarItem {
|
||||
}
|
||||
|
||||
interface FileManagerSidebarProps {
|
||||
density?: "comfortable" | "compact";
|
||||
currentHost: SSHHost;
|
||||
currentPath: string;
|
||||
onPathChange: (path: string) => void;
|
||||
@@ -179,6 +180,7 @@ function StorageMeter({
|
||||
// ─── Component ─────────────────────────────────────────────────────────────────
|
||||
|
||||
export function FileManagerSidebar({
|
||||
density = "comfortable",
|
||||
currentHost,
|
||||
currentPath,
|
||||
onPathChange,
|
||||
@@ -638,7 +640,12 @@ export function FileManagerSidebar({
|
||||
* the async fetch fills it in.
|
||||
*/
|
||||
const renderFolderTreeItem = (item: SidebarItem): React.ReactNode => (
|
||||
<FolderTree.Item key={item.id} id={item.id} label={item.name}>
|
||||
<FolderTree.Item
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
label={item.name}
|
||||
className={density === "compact" ? "py-0.5" : undefined}
|
||||
>
|
||||
<FolderTree.Content>
|
||||
{item.children?.map((child) => renderFolderTreeItem(child))}
|
||||
</FolderTree.Content>
|
||||
|
||||
Reference in new issue
Block a user