Skip to content

Commit

Permalink
Adds expander class to modern theme TOC <li> elements with children (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbotelho authored Oct 24, 2023
1 parent e7b456c commit bf28e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/modern/src/toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export async function renderToc(): Promise<TocNode[]> {
const isExpanded = (tocFilter !== '' && expanded !== false && children != null) || expanded === true

return html`
<li class=${classMap({ expanded: isExpanded, active: activeNodes.includes(node) })}>
<li class=${classMap({ expander: !isLeaf, expanded: isExpanded, active: activeNodes.includes(node) })}>
${isLeaf ? null : html`<span class='expand-stub' @click=${toggleExpand}></span>`}
${dom}
${children}
Expand Down

0 comments on commit bf28e14

Please sign in to comment.