1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-26 05:01:05 +02:00

chore(web): migration svelte 5 syntax (#13883)

This commit is contained in:
Alex
2024-11-14 08:43:25 -06:00
committed by GitHub
parent 9203a61709
commit 0b3742cf13
310 changed files with 6435 additions and 4176 deletions

View File

@ -1,13 +1,20 @@
<script lang="ts">
export let onClick: (e: MouseEvent) => void;
export let label: string;
import type { Snippet } from 'svelte';
interface Props {
onClick: (e: MouseEvent) => void;
label: string;
children?: Snippet;
}
let { onClick, label, children }: Props = $props();
</script>
<button
type="button"
class="my-auto mx-4 rounded-full p-3 text-gray-500 transition hover:bg-gray-500 hover:text-white"
aria-label={label}
on:click={onClick}
onclick={onClick}
>
<slot />
{@render children?.()}
</button>