aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/CardLink.tsx7
-rw-r--r--src/components/LinkWithIcon.tsx25
2 files changed, 5 insertions, 27 deletions
diff --git a/src/components/CardLink.tsx b/src/components/CardLink.tsx
index 8c3f35d..e71cf33 100644
--- a/src/components/CardLink.tsx
+++ b/src/components/CardLink.tsx
@@ -1,5 +1,8 @@
import { useRef, useState } from "react";
-import ExternalLinkIcon from "./ExternalLink";
+
+function Icon() {
+ return <svg className="no-global w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}><path strokeLinecap="round" strokeLinejoin="round" d="M18 13v6a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h6M15 6h4m0 0v4m0-4L10 15" /></svg>;
+}
interface Props {
title: string;
@@ -73,7 +76,7 @@ export default function CardLink({ title, body, href, imgSrc }: Props) {
<h3 className="font-medium">{title}</h3>
<p className="text-sm text-neutral-800 dark:text-neutral-400">{body}</p>
</div>
- {href && <ExternalLinkIcon />}
+ {href && <Icon />}
</div>
);
}
diff --git a/src/components/LinkWithIcon.tsx b/src/components/LinkWithIcon.tsx
deleted file mode 100644
index e7fcbb8..0000000
--- a/src/components/LinkWithIcon.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import ExternalLinkIcon from "./ExternalLink";
-
-export default function LinkWithIcon({
- href,
- children,
- className = 'inline-flex items-center gap-1 underline text-blue-400',
- target = '_blank',
-}: {
- href: string;
- children?: React.ReactNode;
- className?: string;
- target?: React.HTMLAttributeAnchorTarget;
-}) {
- return (
- <a
- href={href}
- target={target}
- rel={target === '_blank' ? 'noopener noreferrer' : undefined}
- className={className}
- >
- {children}
- <ExternalLinkIcon />
- </a>
- );
-} \ No newline at end of file