lupine.components 1.1.1 → 1.1.2
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/package.json
CHANGED
|
@@ -18,6 +18,7 @@ export type MenuSidebarProps = {
|
|
|
18
18
|
maxWidth?: string;
|
|
19
19
|
color?: string;
|
|
20
20
|
backgroundColor?: string;
|
|
21
|
+
isDevAdmin?: boolean;
|
|
21
22
|
};
|
|
22
23
|
export const MenuSidebar = ({
|
|
23
24
|
mobileMenu,
|
|
@@ -29,6 +30,7 @@ export const MenuSidebar = ({
|
|
|
29
30
|
backgroundColor = 'dark',
|
|
30
31
|
maxWidth = '100%',
|
|
31
32
|
maxWidthMobileMenu = MediaQueryMaxWidth.TabletMax,
|
|
33
|
+
isDevAdmin = false,
|
|
32
34
|
}: MenuSidebarProps) => {
|
|
33
35
|
const css: CssProps = {
|
|
34
36
|
// backgroundColor,
|
|
@@ -218,7 +220,7 @@ export const MenuSidebar = ({
|
|
|
218
220
|
const renderItems = (items: NestMenuItemProps[], className: string) => {
|
|
219
221
|
return (
|
|
220
222
|
<div class={className}>
|
|
221
|
-
{items.map((item) => {
|
|
223
|
+
{items.filter((item) => isDevAdmin || !item.devAdmin).map((item) => {
|
|
222
224
|
if (item.hide === true) {
|
|
223
225
|
return null;
|
|
224
226
|
}
|