Files
hossein-por-shop/frontend/components/profile/notifications/notification.vue
T

41 lines
1.0 KiB
Vue

<script setup lang="ts">
// imports
import usePersianDate from "~/composables/global/usePersianDate";
// types
type Props = {
data: Notification;
};
// props
defineProps<Props>();
// state
const { formatToPersian } = usePersianDate();
</script>
<template>
<li class="w-full rounded-xl border border-slate-200 bg-slate-50 p-4 flex items-center justify-between">
<div class="flex flex-col gap-2">
<div class="flex items-center gap-3">
<Icon
:name="data.notif_type == 'NEWS' ? 'ci:bi-info-circle' : 'ci:bi-bell'"
class="lg:text-lg"
/>
<h3 class="max-lg:text-sm font-semibold">{{ data.title }}</h3>
|
<span class="text-xs text-cyan-500 font-semibold">{{ formatToPersian(data.created_at) }}</span>
</div>
<p class="text-xs lg:text-sm leading-[175%] text-slate-700 text-justify">
{{ data.content }}
</p>
</div>
</li>
</template>
<style scoped></style>