summaryrefslogtreecommitdiff
path: root/src/components/Link.astro
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-12 16:05:53 +0200
committerKyren223 <Kyren223@proton.me>2024-11-12 16:05:53 +0200
commit0c17d94c4d1303d73b3ad3e7a9dfef1fb8f0a883 (patch)
tree7a005aedbb5795779a56799fc8e2353a1b126a7a /src/components/Link.astro
parent56e79f187c71eaadca5ae0a1e717793175c04671 (diff)
Backup
Diffstat (limited to 'src/components/Link.astro')
-rw-r--r--src/components/Link.astro12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/Link.astro b/src/components/Link.astro
new file mode 100644
index 0000000..72a0e0a
--- /dev/null
+++ b/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>