From 3626bcf2e3797276a77a780852c465d91b1744f0 Mon Sep 17 00:00:00 2001 From: Mark Dunphy Date: Mon, 7 Apr 2025 20:09:19 -0400 Subject: [PATCH] api reports Signed-off-by: Mark Dunphy --- plugins/catalog-react/report-alpha.api.md | 18 ++++++++++++++---- .../src/alpha/blueprints/index.ts | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-react/report-alpha.api.md b/plugins/catalog-react/report-alpha.api.md index e1d62e1c45..242aa82fa0 100644 --- a/plugins/catalog-react/report-alpha.api.md +++ b/plugins/catalog-react/report-alpha.api.md @@ -11,7 +11,6 @@ import { ExtensionBlueprint } from '@backstage/frontend-plugin-api'; import { ExtensionDefinition } from '@backstage/frontend-plugin-api'; import { JsonValue } from '@backstage/types'; import { JSX as JSX_2 } from 'react'; -import { MenuItemProps } from '@material-ui/core/MenuItem'; import { default as React_2 } from 'react'; import { ResourcePermission } from '@backstage/plugin-permission-common'; import { RouteRef } from '@backstage/frontend-plugin-api'; @@ -362,9 +361,7 @@ export const EntityContextMenuItemBlueprint: ExtensionBlueprint<{ // @alpha (undocumented) export type EntityContextMenuItemParams = { - useProps: () => Omit & { - onClick?: () => Promise; - }; + useProps: UseProps; icon: React_2.JSX.Element; }; @@ -448,5 +445,18 @@ export function useEntityPermission( error?: Error; }; +// @alpha (undocumented) +export type UseProps = () => + | { + title: React_2.ReactNode; + href: string; + disabled?: boolean; + } + | { + title: React_2.ReactNode; + onClick: () => void | Promise; + disabled?: boolean; + }; + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-react/src/alpha/blueprints/index.ts b/plugins/catalog-react/src/alpha/blueprints/index.ts index 2707531f35..89ee947c25 100644 --- a/plugins/catalog-react/src/alpha/blueprints/index.ts +++ b/plugins/catalog-react/src/alpha/blueprints/index.ts @@ -29,4 +29,5 @@ export { type ContextMenuItemProps, type ContextMenuItemComponent, type EntityContextMenuItemParams, + type UseProps, } from './EntityContextMenuItemBlueprint';