ElectronicBabylonianLiterature/ebl-frontend

View on GitHub
src/common/ExternalLink.tsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import React, { DetailedHTMLProps, ReactNode } from 'react'

export default function ExternalLink({
  children,
  ...props
}: { children: ReactNode } & DetailedHTMLProps<
  React.AnchorHTMLAttributes<HTMLAnchorElement>,
  HTMLAnchorElement
>): JSX.Element {
  return (
    <a {...props} target="_blank" rel="noopener noreferrer">
      {children}
    </a>
  )
}