add color menu
This commit is contained in:
@@ -13,6 +13,7 @@ export interface MenuItem {
|
||||
target: string;
|
||||
cssClasses: string[];
|
||||
description: string;
|
||||
menuItemColor?: string | null;
|
||||
childItems?: {
|
||||
nodes: MenuItem[];
|
||||
};
|
||||
@@ -85,6 +86,7 @@ async function fetchMenuById(id: number): Promise<Menu | null> {
|
||||
target
|
||||
cssClasses
|
||||
description
|
||||
menuItemColor
|
||||
childItems(first: 50) {
|
||||
nodes {
|
||||
id
|
||||
@@ -93,6 +95,7 @@ async function fetchMenuById(id: number): Promise<Menu | null> {
|
||||
uri
|
||||
url
|
||||
order
|
||||
menuItemColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,6 +142,7 @@ async function fetchMenuByLocation(location: string): Promise<Menu | null> {
|
||||
target
|
||||
cssClasses
|
||||
description
|
||||
menuItemColor
|
||||
childItems(first: 50) {
|
||||
nodes {
|
||||
id
|
||||
@@ -147,6 +151,7 @@ async function fetchMenuByLocation(location: string): Promise<Menu | null> {
|
||||
uri
|
||||
url
|
||||
order
|
||||
menuItemColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,6 +191,7 @@ async function fetchMenuBySlug(slug: string): Promise<Menu | null> {
|
||||
target
|
||||
cssClasses
|
||||
description
|
||||
menuItemColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,6 +229,7 @@ async function fetchMenuByName(name: string): Promise<Menu | null> {
|
||||
target
|
||||
cssClasses
|
||||
description
|
||||
menuItemColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -305,4 +312,4 @@ export async function getFlatMenu(identifier: MenuIdentifier): Promise<MenuItem[
|
||||
}
|
||||
|
||||
return menu.menuItems.nodes.sort((a, b) => a.order - b.order);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user