~james/core

core/web/src/lib/components/settings/SettingsPanel.svelte -rw-r--r-- 859 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<script lang="ts">
	import type { Snippet } from "svelte";
	import { cn } from "tailwind-variants";
	import SettingsNav, { type SettingsNavItem } from "#lib/components/settings/SettingsNav.svelte";

	interface Props {
		items: SettingsNavItem[];
		active: string;
		label?: string;
		framed?: boolean;
		class?: string;
		children: Snippet;
	}

	let { items, active, label, framed = true, class: className, children }: Props = $props();
</script>

<div
	class={cn(
		"flex w-full flex-col items-stretch gap-md bg-background-default px-sm pt-sm pb-xl md:min-h-150 md:flex-row md:items-start md:overflow-hidden md:p-none",
		framed && "edge-ring ring-border-default md:rounded-md",
		className
	)}
>
	<SettingsNav {items} {active} {label} />

	<div class="flex min-w-0 flex-1 flex-col gap-xl md:gap-2xl md:px-md md:py-xl">
		{@render children()}
	</div>
</div>