feat(www): nav color

This commit is contained in:
shadcn
2024-11-06 17:29:53 +04:00
parent b8ed303d8c
commit c1ae5a57cc
2 changed files with 3 additions and 6 deletions

View File

@@ -15,7 +15,6 @@ import { OpenInV0Cta } from "@/components/open-in-v0-cta"
import { DocsPager } from "@/components/pager"
import { DashboardTableOfContents } from "@/components/toc"
import { badgeVariants } from "@/registry/new-york/ui/badge"
import { ScrollArea } from "@/registry/new-york/ui/scroll-area"
interface DocPageProps {
params: {

View File

@@ -44,18 +44,16 @@ export function DocsSidebarNavItems({
pathname,
}: DocsSidebarNavItemsProps) {
return items?.length ? (
<div className="grid grid-flow-row auto-rows-max text-sm">
<div className="grid grid-flow-row auto-rows-max gap-0.5 text-sm">
{items.map((item, index) =>
item.href && !item.disabled ? (
<Link
key={index}
href={item.href}
className={cn(
"group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline",
"group flex w-full items-center px-2 py-1 font-normal text-foreground hover:underline underline-offset-2",
item.disabled && "cursor-not-allowed opacity-60",
pathname === item.href
? "font-medium text-foreground"
: "text-muted-foreground"
pathname === item.href && "underline"
)}
target={item.external ? "_blank" : ""}
rel={item.external ? "noreferrer" : ""}