fix(toc): display scroll bar only if the content is overflowing (#1185)
The `table-of-content` component shows a scrollbar on Windows even if the content fits:  This fix enables `auto` mode to display scroll bar only if the content is overflowing:  
Denis Bendrikov committed
Jul 8, 2024 at 17:28 UTC
653c3cb3c041ce20153939a8d7cb0db5452ad799
1 file changed
+1
-1
src/components/table-of-contents.js
+1
-1
@@ -83,7 +83,7 @@ export const Desktop = withTableOfContents(({items}) => (
83
sx={{
84
// extra pixels to account for table of contents title height
85
maxHeight: `calc(100% - 24px)`,
86
- overflowY: 'scroll',
86
+ overflowY: 'auto',
87
}}
88
>
89
<TableOfContents aria-labelledby="toc-heading" items={items} sx={{ml: -2}} />