diff --git a/.changeset/modern-mugs-shout.md b/.changeset/modern-mugs-shout.md index 8f45810d21..cb845b1fff 100644 --- a/.changeset/modern-mugs-shout.md +++ b/.changeset/modern-mugs-shout.md @@ -2,4 +2,4 @@ '@backstage/core-components': patch --- -Adds prop to SupportButton to override support config items and adds the option to show custom list items per page +Add items prop to SupportButton. This prop can be used to override the items that would otherwise be grabbed from the config. diff --git a/packages/core-components/src/components/SupportButton/SupportButton.test.tsx b/packages/core-components/src/components/SupportButton/SupportButton.test.tsx index 2a46227e87..2907b24702 100644 --- a/packages/core-components/src/components/SupportButton/SupportButton.test.tsx +++ b/packages/core-components/src/components/SupportButton/SupportButton.test.tsx @@ -24,9 +24,9 @@ import { import { SupportButton } from './SupportButton'; import { configApiRef } from '@backstage/core-plugin-api'; -const configApi = { - getOptionalConfig: () => - new MockConfigApi({ +const configApi = new MockConfigApi({ + app: { + support: { url: 'https://github.com', items: [ { @@ -35,8 +35,9 @@ const configApi = { links: [{ title: 'Github Issues', url: '/issues' }], }, ], - }), -}; + }, + }, +}); const SUPPORT_BUTTON_ID = 'support-button'; const POPOVER_ID = 'support-button-popover';