quickshell-web/src/components/navigation/sidebars/TOC.astro
outfoxxed 44656699ef
improve TOC style somewhat
Still needs considerable work
2025-06-08 17:40:00 -07:00

24 lines
556 B
Text

---
import TableOfContents from "./toc";
import type { ConfigHeading, TypeTOC } from "./types.d.ts";
export interface Props {
title?: string;
headings?: ConfigHeading[];
types?: TypeTOC;
mobile: boolean;
}
const { title, headings, types, mobile } = Astro.props;
---
{(headings?.length ?? 0) + (types?.length ?? 0) != 0 &&
<div id="toc" aria-mobile={mobile} class=`toc-wrapper${mobile ? "-mobile":""}`>
<TableOfContents
title={title}
config={headings}
type={types}
mobile={mobile}
client:idle
/>
</div>
}