diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue index 3ac41042..4f79ce0f 100644 --- a/resources/js/components/AppSidebar.vue +++ b/resources/js/components/AppSidebar.vue @@ -5,7 +5,7 @@ import NavUser from '@/components/NavUser.vue'; import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar'; import { type NavItem } from '@/types'; import { Link } from '@inertiajs/vue3'; -import { BookOpen, Folder, LayoutGrid } from 'lucide-vue-next'; +import { BookOpen, Folder, LayoutGrid, Shield } from 'lucide-vue-next'; import AppLogo from './AppLogo.vue'; const mainNavItems: NavItem[] = [ @@ -14,6 +14,31 @@ const mainNavItems: NavItem[] = [ href: '/dashboard', icon: LayoutGrid, }, + + /* + Example Navigation Item with Children: + Uncomment the block below to see how to create a menu item with children + */ + + // { + // title: 'User Management', + // href: '#', + // icon: Shield, + // children: [ + // { + // title: 'Roles', + // href: '#', + // }, + // { + // title: 'Permissions', + // href: '#', + // }, + // { + // title: 'Users', + // href: '#', + // }, + // ], + // }, ]; const footerNavItems: NavItem[] = [ @@ -37,7 +62,7 @@ const footerNavItems: NavItem[] = [ - + diff --git a/resources/js/components/Breadcrumbs.vue b/resources/js/components/Breadcrumbs.vue index 92fe6ced..b1fcb63c 100644 --- a/resources/js/components/Breadcrumbs.vue +++ b/resources/js/components/Breadcrumbs.vue @@ -1,10 +1,16 @@ diff --git a/resources/js/types/index.d.ts b/resources/js/types/index.d.ts index 853da1d9..9f127f2a 100644 --- a/resources/js/types/index.d.ts +++ b/resources/js/types/index.d.ts @@ -7,8 +7,9 @@ export interface Auth { } export interface BreadcrumbItem { - title: string; - href: string; + title: string + href: string + subItems?: BreadcrumbItem[] } export interface NavItem { @@ -16,6 +17,7 @@ export interface NavItem { href: string; icon?: LucideIcon; isActive?: boolean; + children?: NavItem[]; } export interface SharedData extends PageProps {