Files
backstage/.changeset/proud-dots-fry.md
T
2025-04-08 13:16:07 -04:00

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,
    }),
  },
});