Skip to content

Commit 7da9b83

Browse files
committed
fix: stats
1 parent bb4d1b1 commit 7da9b83

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/src/components/GitHubStats.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script>
2-
import MyIcon from './MyIcon.astro';
32
import { onMount } from 'svelte';
43
54
let error = false;
@@ -33,12 +32,12 @@
3332
{#if !error && !loading}
3433
<div class="github">
3534
<a class="category" href="https://github.com/tomalaforge/angular-challenges">
36-
<MyIcon name="star" />
35+
<slot name="star"/>
3736
<div>{stargazersCount}</div>
3837
</a>
3938

4039
<div class="category fork">
41-
<MyIcon name="fork" viewBox="0 0 16 16" />
40+
<slot name="fork"/>
4241
<div>{forksCount}</div>
4342
</div>
4443
</div>
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
---
22
import Default from '@astrojs/starlight/components/SiteTitle.astro';
33
import GitHubStats from './GitHubStats.svelte';
4+
import MyIcon from './MyIcon.astro';
45
56
---
67

78
<Default {...Astro.props}>
89
<slot />
910
</Default>
1011

11-
<GitHubStats client:load />
12+
<GitHubStats client:load >
13+
<MyIcon name="star" slot="star" />
14+
<MyIcon name="fork" viewBox="0 0 16 16" slot="fork"/>
15+
</GitHubStats>
1216

1317

0 commit comments

Comments
 (0)