add counter to tabbar

This commit is contained in:
2024-12-06 21:51:11 +02:00
parent ef977f5742
commit 021869800f
2 changed files with 12 additions and 4 deletions
@@ -6,11 +6,12 @@
class="flex justify-around sm:justify-between sm:gap-8 sm:px-4 sm:flex-row sm:bg-white sm:max-w-prose mx-auto"
>
<TabMenuItem
v-for="{ route, label, icon } in tabs"
v-for="{ route, label, icon, unreadCount } in tabs"
:key="route"
:label
:icon
:to="{ name: route }"
:unreadCount
/>
</div>
</div>
@@ -22,6 +23,7 @@ type Tab = {
route: (typeof ROUTE_NAMES)[keyof typeof ROUTE_NAMES]
label: string
icon: string
unreadCount?: number
}
const tabs: Tab[] = [
{ route: ROUTE_NAMES.CREATE, label: 'Создать QR-код', icon: 'plus' },