Files
writer-work-flow/apps/web/components/LeftNav.tsx

21 lines
733 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { ActiveNav } from "@/lib/nav/items";
import { NavItems } from "./NavItems";
interface LeftNavProps {
// 项目内页传 projectId → 展开项目级入口(大纲/伏笔/审稿UX §3.1)。
projectId?: string;
activeNav?: ActiveNav;
}
// 桌面静态左导航UX §5.1 / §3.1)。<lg 隐藏,由 NavDrawer 汉堡抽屉替代。
export function LeftNav({ projectId, activeNav }: LeftNavProps) {
return (
<nav
className="sticky top-[var(--chrome)] hidden max-h-[calc(100vh-var(--chrome))] w-44 shrink-0 self-start overflow-y-auto border-r border-line bg-panel py-4 lg:block"
aria-label="主导航"
>
<NavItems projectId={projectId} activeNav={activeNav} />
</nav>
);
}