chore: migrate to svelte 5
This commit is contained in:
@@ -1,17 +1,29 @@
|
||||
<script>
|
||||
import ImageTile from "./ImageTile.svelte";
|
||||
/** @type {string} **/
|
||||
export let src;
|
||||
/** @type {string} **/
|
||||
export let href;
|
||||
/** @type {"_self" | "_blank" | "_parent" | "_top" } **/
|
||||
export let target = "_self";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {string} src
|
||||
* @property {string} href
|
||||
* @property {"_self" | "_blank" | "_parent" | "_top" } [target]
|
||||
* @property {import('svelte').Snippet} [children]
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let {
|
||||
src,
|
||||
href,
|
||||
target = "_self",
|
||||
children
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<ImageTile {src}>
|
||||
<a {href} {target} class="flex items-center justify-center h-full">
|
||||
<slot />
|
||||
{@render children?.()}
|
||||
</a>
|
||||
</ImageTile>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user