UI: Add ExternalLink React element

This commit is contained in:
Mike Salvatore 2021-09-27 14:10:26 -04:00
parent cc531a98ae
commit 7d9386c266
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import React, {ReactFragment, ReactElement} from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faExternalLinkSquareAlt} from '@fortawesome/free-solid-svg-icons';
type Props = {
url: string,
text: string,
}
function ExternalLink(props: Props): ReactElement {
return (
<a href={props.url} target="_blank" rel="noreferrer">
{props.text}
<FontAwesomeIcon icon={faExternalLinkSquareAlt} className="external-link-icon"/>
</a>
)
}
export default ExternalLink

View File

@ -22,3 +22,7 @@
.ransomware-breach-section .ip-address {
display: inline-block;
}
.numbered-report-section .external-link-icon {
margin-left: .25em;
}