Majority of Dropdown Overlay Menu refactors.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2023-12-29 13:26:37 -05:00
parent 79dce5d069
commit 07b46ed92b
32 changed files with 744 additions and 833 deletions

View File

@@ -131,9 +131,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
disabled: existingLayoutKeys.includes(key),
}));
const addComponentOverlay = (
<Menu onClick={handleAddComponent} items={menuItems} />
);
const menu = {items: menuItems, onClick: handleAddComponent};
if (error) return <AlertComponent message={error.message} type="error" />;
@@ -145,7 +143,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
<Button onClick={() => refetch()}>
<SyncOutlined />
</Button>
<Dropdown menu={addComponentOverlay} trigger={["click"]}>
<Dropdown menu={menu} trigger={["click"]}>
<Button>{t("dashboard.actions.addcomponent")}</Button>
</Dropdown>
</Space>