ff-webpage/components/dynamicZone/FileDownload.vue

24 lines
640 B
Vue

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