From aa1bfcea0ff58fd0a47f38e75b235a21ceb32aa3 Mon Sep 17 00:00:00 2001 From: Harry Hogg Date: Mon, 11 Dec 2023 00:13:06 +0000 Subject: [PATCH] fix(ConfigMenu): Added support for disabling menu entries --- workspaces/package/src/ConfigMenu/ConfigMenu.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workspaces/package/src/ConfigMenu/ConfigMenu.tsx b/workspaces/package/src/ConfigMenu/ConfigMenu.tsx index 1b44ec40..c7373654 100644 --- a/workspaces/package/src/ConfigMenu/ConfigMenu.tsx +++ b/workspaces/package/src/ConfigMenu/ConfigMenu.tsx @@ -17,6 +17,7 @@ export type MenuConfig = MenuConfigEntry[]; export type MenuConfigEntry = { label: string; icon: LucideIcon; + disabled?: boolean; config: T; }; @@ -170,6 +171,7 @@ export const ConfigMenu = ({ { event.stopPropagation(); @@ -181,6 +183,7 @@ export const ConfigMenu = ({ ) : ( setActiveKey(entry.label)} title={entry.label} value={getLabel(entry)}