Package: @lilith/admin-shell Split from: lilith/ui.git or lilith/build.git Publish workflow: calls lilith/workflows/.forgejo/workflows/publish-npm.yml@main
12 lines
482 B
JavaScript
12 lines
482 B
JavaScript
export { AdminShell } from './AdminShell';
|
|
export { Sidebar } from './components/Sidebar';
|
|
// Navigation utilities
|
|
export function getAllNavItems(sections) {
|
|
return sections.flatMap((section) => section.items);
|
|
}
|
|
export function findNavItemByPath(sections, path) {
|
|
return getAllNavItems(sections).find((item) => item.to === path);
|
|
}
|
|
export function findSectionByPath(sections, path) {
|
|
return sections.find((section) => section.items.some((item) => item.to === path));
|
|
}
|