mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 18:52:14 +01:00
add reporting submenus to navbar
This commit is contained in:
committed by
Constantin Graf
parent
2560619c15
commit
9c82efdf07
36
resources/js/Components/NavigationSidebarLink.vue
Normal file
36
resources/js/Components/NavigationSidebarLink.vue
Normal 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>
|
||||
Reference in New Issue
Block a user