Skip to content

Commit b6b2348

Browse files
authored
docs: Link to individual attributes (#248)
1 parent 7eaddd5 commit b6b2348

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/src/components/AttributeCard.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ const rawJson = JSON.stringify(attribute, null, 2);
2828
>
2929
<div class="flex flex-wrap items-start justify-between gap-3 mb-3">
3030
<h3 class="flex items-center gap-2 text-base m-0" data-pagefind-meta="title">
31-
<code class="text-base p-0 bg-transparent border-none text-accent" data-pagefind-index-attrs="data-key" data-key={attribute.key}>{attribute.key}</code>
31+
<a href={`#${anchorId}`} class="anchor-link group/anchor flex items-center gap-1.5 no-underline">
32+
<code class="text-base p-0 bg-transparent border-none text-accent" data-pagefind-index-attrs="data-key" data-key={attribute.key}>{attribute.key}</code>
33+
<svg class="anchor-icon w-4 h-4 text-text-muted opacity-0 group-hover/anchor:opacity-100 transition-opacity" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
34+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/>
35+
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>
36+
</svg>
37+
</a>
3238
{isDeprecated && <span class="badge badge-deprecated">Deprecated</span>}
3339
</h3>
3440
<div class="flex flex-wrap items-center gap-2">

0 commit comments

Comments
 (0)