web/ChangelogEntryWrapper: refactor to svelte 5 style

This commit is contained in:
wukko 2025-05-04 16:01:22 +06:00
parent e18664e879
commit 37877a2453
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -1,17 +1,24 @@
<!-- Workaround for https://github.com/pngwn/MDsveX/issues/116 -->
<script lang="ts" context="module">
<script lang="ts" module>
import a from "$components/misc/OuterLink.svelte";
export { a };
</script>
<script lang="ts">
import ChangelogEntry from "$components/changelog/ChangelogEntry.svelte";
export let version = '';
export let title = '';
export let date = '';
export let banner = undefined;
import type { Snippet } from "svelte";
type Props = {
version: string;
title: string;
date: string;
banner?: any;
children: Snippet;
}
const { version, title, date, banner, children }: Props = $props();
</script>
<ChangelogEntry {version} {title} {date} {banner}>
<slot></slot>
{@render children?.()}
</ChangelogEntry>