Skip to content

Commit 9662821

Browse files
committed
fix: add link container
1 parent 379e19b commit 9662821

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/components/QuickLinks.jsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ export function QuickLinks({ children }) {
99
}
1010

1111
export function QuickLink({ title, description, icon, href }) {
12+
const Container = href ? 'a' : 'div';
13+
1214
return (
13-
<a href={href} className="group relative rounded-xl border border-slate-200 dark:border-slate-800 block no-underline">
15+
<Container
16+
href={href}
17+
className={`group relative rounded-xl border border-slate-200 dark:border-slate-800 block ${
18+
href ? 'no-underline hover:cursor-pointer' : ''
19+
}`}
20+
>
1421
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.indigo.400),theme(colors.cyan.400),theme(colors.sky.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
1522
<div className="relative overflow-hidden rounded-xl p-6">
1623
<Icon icon={icon} className="h-8 w-8" />
@@ -21,6 +28,6 @@ export function QuickLink({ title, description, icon, href }) {
2128
{description}
2229
</p>
2330
</div>
24-
</a>
31+
</Container>
2532
);
26-
}
33+
}

0 commit comments

Comments
 (0)