Skip to content

Commit 4f43534

Browse files
authored
Merge pull request #55 from mustafa-sayyed/fix-linkout-component
fix: LinkOut component issue
2 parents 1ae4567 + 4dc22f3 commit 4f43534

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/components/LinkOut.astro

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const { href, withIcon = true } = Astro.props;
66
href={href}
77
target="_blank"
88
rel="noopener noreferrer"
9-
class="icon"
109
>
1110
<slot />
11+
<span class="icon"></span>
1212
</a> :
1313
<a
1414
href={href}
@@ -21,13 +21,9 @@ const { href, withIcon = true } = Astro.props;
2121

2222
<style>
2323
.icon {
24-
white-space: nowrap;
25-
display: inline-flex;
26-
gap: var(--space-3xs);
27-
}
28-
29-
.icon::after {
30-
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path stroke="hsl(221,8%,56%)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 3H3a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4M11 1h6m0 0v6m0-6L7 11"/></svg>');
24+
display: inline-block;
25+
margin-left: var(--space-3xs);
26+
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path stroke="hsl(221,8%,56%)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 3H3a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4M11 1h6m0 0v6m0-6L7 11"/></svg>');
3127
height: 0.75em;
3228
width: 0.75em;
3329
}

0 commit comments

Comments
 (0)