MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / ActivePageMarker

Function ActivePageMarker

apps/baseai.dev/src/components/Navigation.tsx:63–85  ·  view source on GitHub ↗
({
	group,
	pathname
}: {
	group: NavigationItem;
	pathname: string;
})

Source from the content-addressed store, hash-verified

61}
62
63function ActivePageMarker({
64 group,
65 pathname
66}: {
67 group: NavigationItem;
68 pathname: string;
69}) {
70 let itemHeight = remToPx(2);
71 let offset = remToPx(0.25);
72 let activePageIndex = group.links.findIndex(link => link.href === pathname);
73 let top = offset + activePageIndex * itemHeight;
74
75 return (
76 <motion.div
77 layout
78 className="absolute left-2 h-6 w-px bg-zinc-800 dark:bg-white"
79 initial={{ opacity: 0 }}
80 animate={{ opacity: 1, transition: { delay: 0.2 } }}
81 exit={{ opacity: 0 }}
82 style={{ top }}
83 />
84 );
85}
86
87function NavLink({
88 href,

Callers

nothing calls this directly

Calls 1

remToPxFunction · 0.90

Tested by

no test coverage detected