MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / Toc

Function Toc

apps/public/src/components/toc.tsx:10–34  ·  view source on GitHub ↗
({ toc })

Source from the content-addressed store, hash-verified

8}
9
10export const Toc: React.FC<Props> = ({ toc }) => {
11 return (
12 <FeatureCardContainer className="gap-2">
13 <span className="text-lg font-semibold">Table of contents</span>
14 <ul>
15 {toc.map((item) => (
16 <li
17 key={item.url}
18 className="py-1"
19 style={{ marginLeft: `${(item.depth - 2) * (4 * 4)}px` }}
20 >
21 <Link
22 href={item.url}
23 className="hover:underline row gap-2 items-center group/toc-item"
24 title={item.title?.toString() ?? ''}
25 >
26 <ArrowRightIcon className="shrink-0 w-4 h-4 opacity-30 group-hover/toc-item:opacity-100 transition-opacity" />
27 <span className="truncate text-sm">{item.title}</span>
28 </Link>
29 </li>
30 ))}
31 </ul>
32 </FeatureCardContainer>
33 );
34};

Callers

nothing calls this directly

Calls 2

mapMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected