Skip to content

Commit 2903b08

Browse files
Merge pull request #167 from Ari1009/quick-link
Fix quick links navigation
2 parents 350169e + 9662821 commit 2903b08

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/components/QuickLinks.jsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,26 @@ export function QuickLinks({ children }) {
88
)
99
}
1010

11-
export function QuickLink({ title, description, icon }) {
11+
export function QuickLink({ title, description, icon, href }) {
12+
const Container = href ? 'a' : 'div';
13+
1214
return (
13-
<div className="group relative rounded-xl border border-slate-200 dark:border-slate-800">
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" />
1724
<h2 className="mt-4 font-display text-base text-slate-900 dark:text-white">
18-
<span className="absolute -inset-px rounded-xl" />
1925
{title}
2026
</h2>
2127
<p className="mt-1 text-sm text-slate-700 dark:text-slate-400">
2228
{description}
2329
</p>
2430
</div>
25-
</div>
26-
)
27-
}
31+
</Container>
32+
);
33+
}

0 commit comments

Comments
 (0)