ff-webpage/components/dynamicZone/Gallery.vue

22 lines
621 B
Vue

<template>
<div class="flex flex-row flex-wrap gap-2 w-full min-h-fit">
<NuxtPicture
v-for="img in data?.images"
loading="lazy"
class="w-full h-fit md:w-fit md:h-48 object-cover object-center"
:src="baseUrl + img.url"
:imgAttrs="{ class: 'w-full h-full object-cover object-center' }"
/>
</div>
</template>
<script setup lang="ts">
import type { PropType } from "vue";
import type DynamicZoneGallery from "../../types/component/dynamicZoneGallery";
const baseUrl = useStrapiUrl().replace("/api", "");
defineProps({
data: Object as PropType<DynamicZoneGallery>,
});
</script>