mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 21:46:35 +00:00
23 lines
560 B
Svelte
23 lines
560 B
Svelte
<script lang="ts">
|
|
import "$lib/styles/design2.css";
|
|
import type { Snippet } from "svelte";
|
|
import AppShell from "$lib/components/kit/AppShell.svelte";
|
|
import TopBar from "$lib/components/kit/TopBar.svelte";
|
|
|
|
interface Props {
|
|
children: Snippet;
|
|
}
|
|
|
|
let { children }: Props = $props();
|
|
|
|
let theme = $state<"light" | "dark">("light");
|
|
function toggle() {
|
|
theme = theme === "light" ? "dark" : "light";
|
|
}
|
|
</script>
|
|
|
|
<div class="preview-root" data-theme={theme}>
|
|
<TopBar {theme} ontoggle={toggle} />
|
|
<AppShell>{@render children()}</AppShell>
|
|
</div>
|