import * as React from 'react' ; import { FunctionComponent } from 'react' ; import { openTab } from './common' ; const Link = ( { href , className , children } ) => { const onClick = ( e ) => { const event = e . nativeEvent as MouseEvent ; const el = event . target as HTMLAnchorElement ; e . stopPropagation ( ) ; if ( event . button === 0 ) { event . preventDefault ( ) ; openTab ( el . href ) ; } } ; return < a href = { href } className = { 'text-decoration-none ' + className } onClick = { onClick } > { children } < /a>; } ; export default Link ;