Files
SuhailandGitHub 78ffccb9e8 feat(dashboard-beta): notifications (#1718)
* feat(dashboard-beta): notifications

* feat(dashboard-beta): notification counter on sidebar

* feat: add icon to notify of adressible notifs
2024-04-26 14:28:46 +05:30

32 lines
765 B
Vue

<template>
<router-link custom v-slot="{ href, navigate }" :to="item.route">
<a
:href="href"
@click="navigate"
class="flex items-center rounded px-2 py-1 text-gray-800 transition"
:class="[
item.isActive ? 'bg-white shadow-sm' : 'hover:bg-gray-100',
item.disabled ? 'pointer-events-none opacity-50' : '',
$attrs.class
]"
>
<div class="flex w-full items-center space-x-2">
<span class="grid h-5 w-6 place-items-center">
<component :is="item.icon" class="h-4 w-4 text-gray-500" />
</span>
<span class="text-sm">{{ item.name }}</span>
<component :is="item.badge" />
</div>
</a>
</router-link>
</template>
<script setup>
let props = defineProps({
item: {
type: Object,
required: true
}
});
</script>