move icons used from astro to seperate files
This commit is contained in:
parent
8cc064e64a
commit
4682b90711
7 changed files with 21 additions and 93 deletions
|
@ -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}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue