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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lupine.components",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "license": "MIT",
5
5
  "author": "uuware.com",
6
6
  "homepage": "https://github.com/uuware/lupine.js",
@@ -5,6 +5,7 @@ export type MenuItemProps = {
5
5
  js?: () => void;
6
6
  alt?: string;
7
7
  hide?: boolean;
8
+ devAdmin?: boolean;
8
9
  };
9
10
 
10
11
  export type NestMenuItemProps = MenuItemProps & {
@@ -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
  }