forked from p15670423/monkey
UI: Add ExternalLink React element
This commit is contained in:
parent
cc531a98ae
commit
7d9386c266
|
@ -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
|
|
@ -22,3 +22,7 @@
|
|||
.ransomware-breach-section .ip-address {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.numbered-report-section .external-link-icon {
|
||||
margin-left: .25em;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue