Skip to content

Commit afa689e

Browse files
committed
adjust styles and use LinkOverlay
1 parent 8d3a47d commit afa689e

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/components/CardList.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import TwImage, { type ImageProps } from "next/image"
22
import type { ReactNode } from "react"
33

4-
import { BaseLink } from "@/components/Link"
5-
import { LinkBox } from "@/components/ui/link-box"
4+
import { LinkBox, LinkOverlay } from "@/components/ui/link-box"
65

76
import { cn } from "@/lib/utils/cn"
87
import { MatomoEventOptions, trackCustomEvent } from "@/lib/utils/matomo"
98
import * as url from "@/lib/utils/url"
109

10+
import { BaseLink } from "./ui/Link"
11+
1112
import { useRtlFlip } from "@/hooks/useRtlFlip"
1213

1314
export type CardProps = {
@@ -42,9 +43,9 @@ const Card = ({
4243
return (
4344
<div
4445
className={cn(
45-
"text-text flex flex-row items-center gap-4 border border-solid border-border p-4",
46+
"text-text flex flex-row items-center gap-4 border p-4",
4647
"transition-all duration-200",
47-
"hover:rounded-base hover:bg-tableBackgroundHover hover:shadow-[0_0_1px_var(--eth-colors-primary)]",
48+
"hover:bg-background-highlight",
4849
className
4950
)}
5051
onClick={onClick}
@@ -53,14 +54,11 @@ const Card = ({
5354
{image && <TwImage src={image} alt={alt ?? ""} width={imageWidth} />}
5455
<div className="flex flex-1 basis-3/4 flex-col">
5556
{isLink ? (
56-
<BaseLink
57-
href={link}
58-
isExternal={isExternal}
59-
hideArrow
60-
className="text-text hover:no-underline"
61-
>
62-
{title}
63-
</BaseLink>
57+
<LinkOverlay asChild>
58+
<BaseLink href={link} hideArrow className="text-body no-underline">
59+
{title}
60+
</BaseLink>
61+
</LinkOverlay>
6462
) : (
6563
<div>{title}</div>
6664
)}

0 commit comments

Comments
 (0)