Files

24 lines
694 B
Vue

<script setup lang="ts">
import moment from 'moment';
defineProps<{
label: string;
price: number;
time: moment.Moment | string;
}>();
</script>
<template>
<div class="flex flex-col gap-4 rounded-xl bg-primary/10 p-4 shadow-md">
<div class="font-bold text-primary uppercase">{{ label }}</div>
<div class="flex flex-col gap-2">
<div class="text-4xl font-black">
&euro;{{ price?.toPrecision(2).toString().replace('.', ',') }}
</div>
<div class="text-sm text-black/50">
{{ moment.isMoment(time) ? time.format('DD-MM-YYYY HH:mm') : time }}
</div>
</div>
</div>
</template>