Debian Codegraph @

www/src/components/FinderLink.astro

raw
1 ---
2 interface Props {
3 href: string;
4 class?: string;
5 [key: string]: any;
6 }
7
8 const { href, class: className, ...rest } = Astro.props;
9 ---
10
11 <a href={href}
12 {...rest}
13 class:list={["finder-link", "group/link", className]}>
14 <slot />
15 </a>
16
17 <style>
18 .finder-link {
19 display: flex;
20 align-items: center;
21 gap: 1rem;
22 padding: 0.625rem 0.75rem;
23 margin-inline: -0.75rem;
24 text-decoration: none;
25 border-radius: 0.375rem;
26 color: light-dark(var(--color-neutral-800), var(--color-neutral-200));
27
28 @media (min-width: 640px) {
29 gap: 1.25rem;
30 padding-block: 0.5rem;
31 }
32
33 @media (hover: hover) {
34 &:hover {
35 background: light-dark(var(--color-blue-700), var(--color-blue-350));
36 color: light-dark(white, black);
37 }
38 }
39
40 &:is(:focus-visible, :active) {
41 background: light-dark(var(--color-blue-700), var(--color-blue-350));
42 color: light-dark(white, black);
43 }
44
45 &[aria-current] {
46 color: light-dark(white, black);
47 }
48 }
49 </style>