@buerokratt-ria/menu 0.1.7 → 0.1.9
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
|
@@ -24,6 +24,7 @@ interface MenuItem {
|
|
|
24
24
|
path?: string;
|
|
25
25
|
target?: '_blank' | '_self';
|
|
26
26
|
children?: MenuItem[];
|
|
27
|
+
hidden?: boolean;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
interface TranslatedLabel {
|
|
@@ -105,7 +106,7 @@ const MainNavigation: FC<{items: MenuItem[], serviceId: string[]}> = ( {items, s
|
|
|
105
106
|
};
|
|
106
107
|
|
|
107
108
|
const renderMenuTree = (menuItems: MenuItem[]) => {
|
|
108
|
-
return menuItems.map((menuItem) => (
|
|
109
|
+
return menuItems.filter(x => !x.hidden).map((menuItem) => (
|
|
109
110
|
<li key={menuItem.label[currentlySelectedLanguage]}>
|
|
110
111
|
{!!menuItem.children ? (
|
|
111
112
|
<>
|
|
Binary file
|