ff-webpage/components/dynamicZone/Gallery.vue

24 lines
676 B
Vue
Raw Normal View History

<template>
<div class="flex flex-row flex-wrap gap-2 w-full min-h-fit">
<NuxtPicture
v-for="img in data?.images"
loading="lazy"
2024-11-06 07:59:07 +00:00
class="w-full h-fit sm:w-fit sm:h-48 object-cover object-center"
:src="baseUrl + img.url"
2024-11-06 07:59:07 +00:00
:imgAttrs="{ class: 'w-full h-fit sm:w-fit sm:h-48 object-cover object-center' }"
/>
</div>
</template>
<script setup lang="ts">
import type { PropType } from "vue";
import type DynamicZoneGallery from "../../types/component/dynamicZoneGallery";
2024-11-05 17:31:12 +00:00
const runtimeConfig = useRuntimeConfig();
const baseUrl = runtimeConfig.public.strapi.url;
defineProps({
data: Object as PropType<DynamicZoneGallery>,
});
</script>