diff options
| author | Adam Soltys <[email protected]> | 2026-03-02 22:37:05 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-02 22:37:05 -0800 |
| commit | 11d358ad0412b794ecf89b4da9f99ac41ed9c3fe (patch) | |
| tree | 61808f5d31df326ad7c3d459e16d4f6085368ad0 /src/components/DarkToggle.svelte | |
| parent | c0da099aa48f6bbc168159293bfae9e60daffeda (diff) | |
| download | coinos-ui-11d358ad0412b794ecf89b4da9f99ac41ed9c3fe.tar.gz coinos-ui-11d358ad0412b794ecf89b4da9f99ac41ed9c3fe.zip | |
inline icons
Diffstat (limited to 'src/components/DarkToggle.svelte')
| -rw-r--r-- | src/components/DarkToggle.svelte | 12 |
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> |
