12 lines
304 B
TypeScript
12 lines
304 B
TypeScript
import type { AnchorHTMLAttributes } from 'react'
|
|
|
|
type ExternalLinkProps = Omit<
|
|
AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
'href' | 'rel' | 'target'
|
|
> & {
|
|
href: string
|
|
}
|
|
|
|
export function ExternalLink(props: ExternalLinkProps) {
|
|
return <a {...props} target="_blank" rel="noopener noreferrer" />
|
|
}
|