ultisuite-client/lib/folder-nav-icons.ts

26 lines
794 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { addCollection } from "@iconify/react"
import { icons as fluentIcons } from "@iconify-json/fluent"
import { navFolderIconColorFromBgClass } from "@/lib/label-pill-contrast"
addCollection(fluentIcons)
export { navFolderIconColorFromBgClass }
/** Icône Fluent dossier (sidebar + fil dAriane). */
export function folderTreeNavIconName(
hasChildren: boolean,
open: boolean
): string {
if (!hasChildren) return "fluent:folder-20-filled"
return open
? "fluent:folder-open-20-filled"
: "fluent:folder-list-20-filled"
}
/** Fil dAriane : toujours la variante fermée. */
export function folderTreeNavIconNameClosed(hasChildren: boolean): string {
return folderTreeNavIconName(hasChildren, false)
}
export const FOLDER_SECTION_ICON = "fluent:folder-mail-20-filled"