- replace template home page with Compass branding and WIP notice - rewrite dashboard as project status page with working/in-progress/planned sections - fix content scrolling inside inset panel (no more clipped rounded corners) - extract command menu into shared context so sidebar search triggers it too
54 lines
1.2 KiB
TypeScript
Executable File
54 lines
1.2 KiB
TypeScript
Executable File
"use client"
|
|
|
|
import * as React from "react"
|
|
import { type Icon } from "@tabler/icons-react"
|
|
|
|
import {
|
|
SidebarGroup,
|
|
SidebarGroupContent,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
} from "@/components/ui/sidebar"
|
|
|
|
export function NavSecondary({
|
|
items,
|
|
...props
|
|
}: {
|
|
items: {
|
|
title: string
|
|
url?: string
|
|
icon: Icon
|
|
onClick?: () => void
|
|
}[]
|
|
} & React.ComponentPropsWithoutRef<typeof SidebarGroup>) {
|
|
return (
|
|
<SidebarGroup {...props}>
|
|
<SidebarGroupContent>
|
|
<SidebarMenu>
|
|
{items.map((item) => (
|
|
<SidebarMenuItem key={item.title}>
|
|
<SidebarMenuButton
|
|
asChild={!item.onClick}
|
|
onClick={item.onClick}
|
|
>
|
|
{item.onClick ? (
|
|
<>
|
|
<item.icon />
|
|
<span>{item.title}</span>
|
|
</>
|
|
) : (
|
|
<a href={item.url}>
|
|
<item.icon />
|
|
<span>{item.title}</span>
|
|
</a>
|
|
)}
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
))}
|
|
</SidebarMenu>
|
|
</SidebarGroupContent>
|
|
</SidebarGroup>
|
|
)
|
|
}
|