import '../styles/Link.sass'

interface Props {
  to: string
  children?: any
  newtab?: boolean
}

export default (props: Props) => {
  return (
    <>
      <a href={props.to} aria-label={`Go to ${props.to}`} rel="noopener" target={props.newtab ? '_blank' : '_self'} data-astro-prefetch>
        {props.children}
      </a>
    </>
  )
}
