---
interface LinkProps {
  href: string;
  newTab?: boolean;
  content: string;
}

const { href, newTab } = Astro.props as LinkProps;
const target = newTab ? "_blank" : "_self";
const rel = newTab ? "noopener noreferrer" : "";
---

<a href={href} target={target} rel={rel}>
  <slot />
</a>

<style>
  a {
    color: var(--text-color);
  }
</style>
