aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/DarkToggle.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/DarkToggle.svelte')
-rw-r--r--src/components/DarkToggle.svelte12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/DarkToggle.svelte b/src/components/DarkToggle.svelte
index f2cb97db..cd0dd02b 100644
--- a/src/components/DarkToggle.svelte
+++ b/src/components/DarkToggle.svelte
@@ -1,4 +1,6 @@
<script lang="ts">
+ import PhSunBold from "virtual:icons/ph/sun-bold";
+ import PhMoonStarsBold from "virtual:icons/ph/moon-stars-bold";
import { t } from "$lib/translations";
import { theme } from "$lib/store";
let dark = () => {
@@ -8,11 +10,11 @@
</script>
<button class="flex justify-center items-center hover:opacity-80 gap-2 font-bold whitespace-nowrap" onclick={dark}>
- <iconify-icon
- noobserver
- icon={$theme === "dark" ? "ph:sun-bold" : "ph:moon-stars-bold"}
- width="30"
- ></iconify-icon>
+ {#if $theme === "dark"}
+ <PhSunBold width="30" />
+ {:else}
+ <PhMoonStarsBold width="30" />
+ {/if}
{$t(`nav.${$theme === "dark" ? "light" : "dark"}`)}
</button>