Skip to content

Commit 2c5d337

Browse files
committed
external link inline anchor, moved icon outside of anchor
1 parent 436a372 commit 2c5d337

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

src/components/mdx/ExternalLink.astro

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ type Props = HTMLAttributes<'a'>;
77
const { href, ...props } = Astro.props;
88
---
99

10-
<a
11-
href={href}
12-
target="_blank"
13-
rel="noreferrer"
14-
aria-label="Open project in new window"
15-
class="mb-5 inline-block w-full truncate font-medium"
16-
{...props}
17-
>
18-
<Icon name="link" class="me-1 shrink-0" size={20} aria-hidden="true" />
19-
<span>{href}</span>
20-
</a>
10+
<div class="mb-5 flex items-center">
11+
<Icon name="link" class="me-2 shrink-0" size={20} aria-hidden="true" />
12+
<span class="truncate">
13+
<a
14+
href={href}
15+
target="_blank"
16+
rel="noreferrer"
17+
aria-label="Open project in new window"
18+
class="font-medium"
19+
{...props}
20+
>
21+
{href}
22+
</a>
23+
</span>
24+
</div>

0 commit comments

Comments
 (0)