@buerokratt-ria/menu 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/menu/index.tsx
CHANGED
|
@@ -15,6 +15,7 @@ interface MenuItem {
|
|
|
15
15
|
path?: string;
|
|
16
16
|
target?: '_blank' | '_self';
|
|
17
17
|
children?: MenuItem[];
|
|
18
|
+
hidden?: boolean;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
interface TranslatedLabel {
|
|
@@ -97,7 +98,7 @@ const MainNavigation: FC<{items: MenuItem[], serviceId: string[]}> = ( {items, s
|
|
|
97
98
|
};
|
|
98
99
|
|
|
99
100
|
const renderMenuTree = (menuItems: MenuItem[]) => {
|
|
100
|
-
return menuItems.map((menuItem) => (
|
|
101
|
+
return menuItems.filter(x => !x.hidden).map((menuItem) => (
|
|
101
102
|
<li key={menuItem.label[currentlySelectedLanguage]}>
|
|
102
103
|
{!!menuItem.children ? (
|
|
103
104
|
<>
|
|
Binary file
|