aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ExternalLink.astro
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-06-18 23:19:10 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-06-18 23:19:10 +0900
commit5bc1e63756cae6974430f1e6cf1a4d5e88f5b9cc (patch)
tree46ab1a541403d680fe1719da941d7702159fd453 /src/components/ExternalLink.astro
Initial commit
Diffstat (limited to 'src/components/ExternalLink.astro')
-rw-r--r--src/components/ExternalLink.astro15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/ExternalLink.astro b/src/components/ExternalLink.astro
new file mode 100644
index 0000000..1068872
--- /dev/null
+++ b/src/components/ExternalLink.astro
@@ -0,0 +1,15 @@
+---
+export interface Props {
+ href?: string;
+}
+const { href } = Astro.props;
+---
+{
+ href ? (
+ <a href={href} rel="noopener noreferrer" target="_blank">
+ <slot />
+ </a>
+ ) : (
+ <><slot /></>
+ )
+}