Arseniy Klempner f6d477d534
feat(sds): initial commit for sds demo
add legend explaining sds concepts
add store queries for missed messages
add history visualization partitioned and ordered by lamport timestamp
matchmaking and message sending scenarios
add a theme
better theme
support more than 2 participants
2025-05-12 19:05:04 -07:00

34 lines
867 B
Svelte

<script lang="ts">
import { fade } from "svelte/transition";
type MaxWidthOption = "sm" | "md" | "lg" | "xl" | "2xl";
export let maxWidth: MaxWidthOption = "md";
export let padding = "p-8";
export let margin = "sm:my-12 my-4";
export let title = "";
const maxWidthClasses: Record<MaxWidthOption, string> = {
sm: "max-w-sm",
md: "max-w-md",
lg: "max-w-lg",
xl: "max-w-xl",
"2xl": "max-w-2xl",
};
</script>
<div class="relative min-h-screen">
<div
class="{maxWidthClasses[maxWidth]} mx-auto {padding} bg-white rounded-lg sm:shadow-md absolute top-0 left-0 right-0 {margin}"
in:fade={{ duration: 300 }}
out:fade={{ duration: 300 }}
>
{#if title}
<h1 class="text-2xl font-bold text-gray-800 mb-6 tracking-tight text-center">
{title}
</h1>
{/if}
<slot />
</div>
</div>