ff-webpage/components/dynamicZone/FileDownload.vue

25 lines
640 B
Vue
Raw Normal View History

2025-01-18 11:30:46 +01:00
<template>
<div class="flex flex-col gap-2 w-full min-h-fit max-w-4xl mx-auto">
2025-01-18 11:30:46 +01:00
<a
2025-02-14 13:57:55 +01:00
:href="baseUrl + data?.file.url"
:download="data?.file.name"
2025-01-18 11:30:46 +01:00
target="_blank"
class="w-fit text-primary underline"
>
Datei {{ data?.file.name }} herunterladen
2025-01-18 11:30:46 +01:00
</a>
</div>
</template>
<script setup lang="ts">
import type { PropType } from "vue";
2025-02-14 13:57:55 +01:00
import type DynamicZoneFileDownload from "../../types/component/dynamic-zone/fileDownload";
2025-01-18 11:30:46 +01:00
const runtimeConfig = useRuntimeConfig();
const baseUrl = runtimeConfig.public.strapi.url;
defineProps({
2025-01-18 11:30:46 +01:00
data: Object as PropType<DynamicZoneFileDownload>,
});
</script>