jedmund-svelte/src/lib/components/ImagePost.svelte
2025-06-11 00:54:05 -07:00

16 lines
338 B
Svelte

<script lang="ts">
import Slideshow from './Slideshow.svelte'
let {
images = [],
alt = ''
}: {
images: string[]
alt?: string
} = $props()
// Convert string array to slideshow items
const slideshowItems = $derived(images.map((url) => ({ url, alt })))
</script>
<Slideshow items={slideshowItems} {alt} aspectRatio="4/3" />