From f2e93c3314765a46aea8710acd20e7e8a6556c4b Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 31 Jan 2024 20:26:34 +0000
Subject: [PATCH] chore(deps-dev): bump @types/node from 20.11.11 to 20.11.14 (#779)

---
 quartz/components/TableOfContents.tsx |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/quartz/components/TableOfContents.tsx b/quartz/components/TableOfContents.tsx
index 4604565..167c837 100644
--- a/quartz/components/TableOfContents.tsx
+++ b/quartz/components/TableOfContents.tsx
@@ -1,6 +1,7 @@
 import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
 import legacyStyle from "./styles/legacyToc.scss"
 import modernStyle from "./styles/toc.scss"
+import { classNames } from "../util/lang"
 
 // @ts-ignore
 import script from "./scripts/toc.inline"
@@ -19,8 +20,8 @@
   }
 
   return (
-    <div class={`toc ${displayClass}`}>
-      <button type="button" id="toc">
+    <div class={classNames(displayClass, "toc")}>
+      <button type="button" id="toc" class={fileData.collapseToc ? "collapsed" : ""}>
         <h3>Table of Contents</h3>
         <svg
           xmlns="http://www.w3.org/2000/svg"
@@ -60,7 +61,7 @@
   }
 
   return (
-    <details id="toc" open>
+    <details id="toc" open={!fileData.collapseToc}>
       <summary>
         <h3>Table of Contents</h3>
       </summary>

--
Gitblit v1.10.0