From 9c3cb8d4e2b522fdbffa18ac38ef3126b88dabb3 Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Thu, 23 Sep 2021 14:02:39 +0200 Subject: [PATCH] Rely on the default `Link` behavior for opening external links in a new window in the `SupportButton` Signed-off-by: Dominik Henneke --- .changeset/plenty-feet-pay.md | 5 +++++ .../src/components/SupportButton/SupportButton.tsx | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/plenty-feet-pay.md diff --git a/.changeset/plenty-feet-pay.md b/.changeset/plenty-feet-pay.md new file mode 100644 index 0000000000..43fab61c79 --- /dev/null +++ b/.changeset/plenty-feet-pay.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Stop forcing `target="_blank"` in the `SupportButton` but instead use the default logic of the `Link` component, that opens external targets in a new window and relative targets in the same window. diff --git a/packages/core-components/src/components/SupportButton/SupportButton.tsx b/packages/core-components/src/components/SupportButton/SupportButton.tsx index 8076636654..62d753e08b 100644 --- a/packages/core-components/src/components/SupportButton/SupportButton.tsx +++ b/packages/core-components/src/components/SupportButton/SupportButton.tsx @@ -54,9 +54,7 @@ const SupportIcon = ({ icon }: { icon: string | undefined }) => { }; const SupportLink = ({ link }: { link: SupportItemLink }) => ( - - {link.title ?? link.url} - + {link.title ?? link.url} ); const SupportListItem = ({ item }: { item: SupportItem }) => {