Skip to content

Commit 2992357

Browse files
jacobseeJacob See
andauthored
Add popout icon to all links that open new windows (#563)
* Add icon to indicate that artifact will open in a new window * Add the box icon to all popout links Co-authored-by: Jacob See <[email protected]>
1 parent 4b3c1e4 commit 2992357

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/link_or_span/link_or_span.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React from 'react';
2+
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
23

34
export interface LinkOrSpanProps {
45
href?: string;
56
children: any;
67
}
78
export const LinkOrSpan = ({ href, children }: LinkOrSpanProps) => {
89
if (!!href) {
9-
return <a href={href} target="_blank" rel="noreferrer">{children}</a>;
10+
return <a href={href} target="_blank" rel="noreferrer">{children} &nbsp; <ExternalLinkAltIcon /></a>;
1011
} else {
1112
return <span>{children}</span>;
1213
}

0 commit comments

Comments
 (0)