move icons used from astro to seperate files

This commit is contained in:
outfoxxed 2024-10-14 23:36:03 -07:00
parent 8cc064e64a
commit 4682b90711
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 21 additions and 93 deletions

View file

@ -5,7 +5,9 @@ import {
onMount,
type VoidComponent,
} from "solid-js";
import { Sun, Moon } from "@icons";
import Sun from "@icons/sun.svg?raw";
import Moon from "@icons/moon.svg?raw";
interface ThemeProps {
theme: "light" | "dark";
@ -89,13 +91,10 @@ export const ThemeSelect: VoidComponent = () => {
});
return (
<div onclick={toggleTheme} class="theme-toggle">
{(mounted() && currentTheme().theme === "light") ||
currentTheme().system === "light" ? (
<Sun class="theme-sun" />
) : (
<Moon class="theme-moon" />
)}
</div>
<div
onclick={toggleTheme}
class="theme-toggle"
innerHTML={(mounted() && currentTheme().theme === "light") || currentTheme().system === "light" ? Sun : Moon}
/>
);
};