add reporting submenus to navbar

This commit is contained in:
Gregor Vostrak
2024-11-04 15:19:35 +01:00
committed by Constantin Graf
parent 2560619c15
commit 9c82efdf07
4 changed files with 156 additions and 32 deletions

View File

@@ -0,0 +1,36 @@
<script setup lang="ts">
import { Link } from '@inertiajs/vue3';
import type { Component } from 'vue';
defineProps<{
title: string;
icon?: Component;
current?: boolean;
href: string;
}>();
</script>
<template>
<Link :href="href" class="block group">
<div
:class="[
current
? 'bg-menu-active text-white'
: 'text-muted group-hover:text-white group-hover:bg-menu-active ',
'group flex gap-x-2 rounded-md transition leading-6 py-1 px-2 font-medium text-sm items-center',
]">
<component
v-if="icon"
:is="icon"
:class="[
current
? 'text-icon-active'
: 'text-icon-default group-hover:text-icon-active',
'transition h-5 w-5 shrink-0',
]"
aria-hidden="true" />
{{ title }}
</div>
</Link>
</template>
<style scoped></style>