This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
2
+ import React from 'react' ;
3
+ import clsx from 'clsx' ;
4
+ import TOCItems from '@theme/TOCItems' ;
5
+ import styles from './styles.module.css' ;
6
+ // Using a custom className
7
+ // This prevents TOCInline/TOCCollapsible getting highlighted by mistake
8
+ const LINK_CLASS_NAME = 'table-of-contents__link toc-highlight' ;
9
+ const LINK_ACTIVE_CLASS_NAME = 'table-of-contents__link--active' ;
10
+ export default function TOC ( { className, ...props } ) {
11
+ return (
12
+ < div className = { clsx ( styles . tableOfContents , 'thin-scrollbar' , className ) } >
13
+ < TOCItems
14
+ { ...props }
15
+ linkClassName = { LINK_CLASS_NAME }
16
+ linkActiveClassName = { LINK_ACTIVE_CLASS_NAME }
17
+ />
18
+ </ div >
19
+ ) ;
20
+ }
Original file line number Diff line number Diff line change
1
+ .tableOfContents {
2
+ max-height : calc (100vh - (var (--ifm-navbar-height ) + 2rem ));
3
+ overflow-y : auto;
4
+ position : sticky;
5
+ top : calc (var (--ifm-navbar-height ) + 1rem );
6
+ }
7
+
8
+ .tableOfContents li a {
9
+ color : var (--ifm-toc-link-color );
10
+ }
11
+
12
+ .tableOfContents li a : hover {
13
+ color : unset;
14
+ }
15
+
16
+ @media (max-width : 996px ) {
17
+ .tableOfContents {
18
+ display : none;
19
+ }
20
+
21
+ .docItemContainer {
22
+ padding : 0 0.3rem ;
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments