summaryrefslogtreecommitdiff
path: root/old_stuff/src/components/Link.astro
diff options
context:
space:
mode:
Diffstat (limited to 'old_stuff/src/components/Link.astro')
-rw-r--r--old_stuff/src/components/Link.astro12
1 files changed, 12 insertions, 0 deletions
diff --git a/old_stuff/src/components/Link.astro b/old_stuff/src/components/Link.astro
new file mode 100644
index 0000000..e8396ec
--- /dev/null
+++ b/old_stuff/src/components/Link.astro
@@ -0,0 +1,12 @@
+---
+interface Props {
+ href: string;
+ newTab?: boolean;
+}
+
+const { href, newTab = true } = Astro.props;
+---
+
+<a href={href} {...newTab && { target: "_blank", rel: "noopener noreferrer" }}>
+ <slot />
+</a>