mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 06:31:49 +00:00
Add showTitle option to tableOfContent and id to style it (#2472)
* Enhance Table of Contents: Add customizable title display option and update TOC title element with an ID * add changeset * remove showTitle option and add toc-title ID for styling
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-ui': patch
|
||||
---
|
||||
|
||||
Add a `toc-title` ID to the table of contents heading for styling purposes
|
||||
@@ -108,6 +108,8 @@ import { DocsPage } from 'fumadocs-ui/page';
|
||||
</DocsPage>;
|
||||
```
|
||||
|
||||
You can also style the TOC title with the `toc-title` ID.
|
||||
|
||||
### Last Updated Time
|
||||
|
||||
Display last updated time of the page.
|
||||
|
||||
@@ -20,6 +20,7 @@ import type { AnchorProviderProps } from 'fumadocs-core/toc';
|
||||
export function PageTOCTitle(props: ComponentProps<'h2'>) {
|
||||
return (
|
||||
<h3
|
||||
id="toc-title"
|
||||
{...props}
|
||||
className={cn(
|
||||
'inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground',
|
||||
|
||||
Reference in New Issue
Block a user