We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 589b75d commit 0857d8aCopy full SHA for 0857d8a
dotcom-rendering/src/components/ProductLinkButton.tsx
@@ -1,5 +1,5 @@
1
import {
2
- Button,
+ LinkButton,
3
SvgArrowRightStraight,
4
} from '@guardian/source/react-components';
5
@@ -10,15 +10,15 @@ type ProductLinkButtonProps = {
10
11
export const ProductLinkButton = ({ label, url }: ProductLinkButtonProps) => {
12
return (
13
- <Button
14
- onClick={() => {
15
- window.open(url, '_blank');
16
- }}
+ <LinkButton
+ href={url}
+ target="_blank"
+ rel="noopener noreferrer"
17
iconSide="right"
18
aria-label={`Open ${label} in a new tab`}
19
icon={<SvgArrowRightStraight />}
20
>
21
{label}
22
- </Button>
+ </LinkButton>
23
);
24
};
0 commit comments