aboutsummaryrefslogtreecommitdiff
path: root/src/components/ExternalLink.js
blob: 71e09dd9479969a48ecbc10d3d131a7d82b68a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import React from 'react';
//import styles from './ExternalLink.module.css';
import ExternalLinkIcon from '@theme/Icon/ExternalLink';

export default function ExternalLink({children, href}) {
  if(href) {
    return (
      <a href={href} rel={"noopener noreferrer"} target={"_blank"}>
        {children} <ExternalLinkIcon />
      </a>
    );
  }
  return (
    <>{children}</>
  );
}