ff-webpage/components/dynamicZone/Gallery.vue

24 lines
660 B
Vue
Raw Permalink 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-10 07:29:08 +00:00
class="max-sm:w-full sm:h-48 object-cover object-center"
:src="baseUrl + img.url"
2024-11-10 07:29:08 +00:00
:imgAttrs="{ class: 'max-sm:w-full 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>