5ed70bf42e
Signed-off-by: Mark Dunphy <markd@spotify.com>
862 B
862 B
@backstage/plugin-catalog-react, @backstage/plugin-catalog
| @backstage/plugin-catalog-react | @backstage/plugin-catalog |
|---|---|
| minor | minor |
Adds EntityContextMenuItemBlueprint to enable extending the entity page's context menu with user defined items.
For example:
import { EntityContextMenuItemBlueprint } from '@backstage/plugin-catalog-react/alpha';
const myCustomHref = EntityContextMenuItemBlueprint.make({
name: 'test-href',
params: {
icon: <span>Example Icon</span>,
useProps: () => ({
title: 'Example Href',
href: '/example-path',
disabled: false,
component: 'a',
}),
},
});
const myCustomOnClick = EntityContextMenuItemBlueprint.make({
name: 'test-click',
params: {
icon: <span>Test Icon</span>,
useProps: () => ({
title: 'Example onClick',
onClick: () => window.alert('Hello world!'),
disabled: false,
}),
},
});