Skip to content

Commit

Permalink
Fix link component
Browse files Browse the repository at this point in the history
  • Loading branch information
Hurtak committed Sep 23, 2023
1 parent 136948f commit 26bf95a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/base/link.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import cn from "clsx";
import NextLink from "next/link"; // eslint-disable-line no-restricted-imports
import { ReactNode } from "react";

Expand Down Expand Up @@ -26,7 +27,7 @@ export const Link = ({
<>
<NextLink
href={hrefNormalized}
className={className}
className={cn("link", className)}
{...(openToNewTab && {
rel: "noopener noreferrer",
target: "_blank",
Expand All @@ -35,15 +36,15 @@ export const Link = ({
{children}
</NextLink>

<style jsx>{`
a {
<style jsx global>{`
a.link {
display: inline-flex;
color: ${colors.blue};
text-decoration-thickness: ${pxCss(0.5)};
text-underline-offset: ${pxCss(1)};
}
a:visited {
color: ${colors.blue};
color: ${colors.purple};
}
`}</style>
</>
Expand Down
1 change: 1 addition & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export const colors = {
gray: "#f3f3f3",

blue: "blue",
purple: "purple",
};

0 comments on commit 26bf95a

Please sign in to comment.