Add initial shared code packages

This commit is contained in:
Gabriel20xx committed 2026-08-04 15:17:15 +02:00
commit 838a97d344
54 files changed
+6265

No files matched your search

@@ -0,0 +1,51 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import type { NavItem } from '../types';
import Header from './Header.svelte';
let {
brand = 'Application',
brandHref = '/',
children,
class: className = '',
currentPath = '',
navItems = [],
onLogout,
onProfile,
onSettings,
showSettings = true,
theme = 'dark',
username = ''
}: {
brand?: string;
brandHref?: string;
children?: Snippet;
class?: string;
currentPath?: string;
navItems?: NavItem[];
onLogout?: () => void | Promise<void>;
onProfile?: () => void;
onSettings?: () => void;
showSettings?: boolean;
theme?: 'dark' | 'light' | 'system';
username?: string;
} = $props();
</script>
<div class={`sc-root sc-app-shell ${className}`} data-theme={theme === 'system' ? undefined : theme}>
<Header
{brand}
{brandHref}
{currentPath}
{navItems}
{onLogout}
{onProfile}
{onSettings}
{showSettings}
{username}
/>
<main class="sc-main">
{@render children?.()}
</main>
</div>