You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
927 B
Vue
28 lines
927 B
Vue
<script setup lang="ts">
|
|
import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
|
|
import { type NavItem, type SharedData } from '@/types';
|
|
import { Link, usePage } from '@inertiajs/vue3';
|
|
|
|
defineProps<{
|
|
items: NavItem[];
|
|
}>();
|
|
|
|
const page = usePage<SharedData>();
|
|
</script>
|
|
|
|
<template>
|
|
<SidebarGroup class="px-2 py-0">
|
|
<SidebarGroupLabel>Platform</SidebarGroupLabel>
|
|
<SidebarMenu>
|
|
<SidebarMenuItem v-for="item in items" :key="item.title">
|
|
<SidebarMenuButton as-child :is-active="item.href === page.url">
|
|
<Link :href="item.href">
|
|
<component :is="item.icon" />
|
|
<span>{{ item.title }}</span>
|
|
</Link>
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
</SidebarMenu>
|
|
</SidebarGroup>
|
|
</template>
|