From 7cd208c2df61cfa3795b43191c6f8fe02f926037 Mon Sep 17 00:00:00 2001 From: Tom Elliot <3267684+tomelliot@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:33:20 +0200 Subject: [PATCH 1/2] feat: add indentDepth prop to TOCInline component --- packages/pliny/src/ui/TOCInline.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/pliny/src/ui/TOCInline.tsx b/packages/pliny/src/ui/TOCInline.tsx index ce80ec7..36023c4 100644 --- a/packages/pliny/src/ui/TOCInline.tsx +++ b/packages/pliny/src/ui/TOCInline.tsx @@ -2,6 +2,7 @@ import { Toc, TocItem } from '../mdx-plugins/remark-toc-headings' export interface TOCInlineProps { toc: Toc + indentDepth?: number fromHeading?: number toHeading?: number asDisclosure?: boolean @@ -52,6 +53,7 @@ const createNestedList = (items: TocItem[]): NestedTocItem[] => { * If you are using tailwind css and want to revert to the default HTML list style, set `ulClassName="[&_ul]:list-[revert]"` * @param {TOCInlineProps} { * toc, + * indentDepth = 3, * fromHeading = 1, * toHeading = 6, * asDisclosure = false, @@ -64,6 +66,7 @@ const createNestedList = (items: TocItem[]): NestedTocItem[] => { */ const TOCInline = ({ toc, + indentDepth = 3, fromHeading = 1, toHeading = 6, asDisclosure = false, @@ -89,7 +92,7 @@ const TOCInline = ({ return (