Skip to content

Commit f3ed7f7

Browse files
authored
fixes #165 (#197)
Signed-off-by: Cristian Postescu <postescu@gmail.com>
1 parent f6419c8 commit f3ed7f7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/components/rightSidebar.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const useStyles = makeStyles((theme: Theme) => ({
3232
position: 'fixed',
3333
top: '100px',
3434
borderLeft: theme.palette.type === 'light' ? '1px solid #DBDDE0' : '1px solid #353738',
35+
width: '240px',
36+
textIndent: '-9px',
3537
},
3638
link: {
3739
color: theme.overrides.MuiTypography.body2.color,
@@ -80,7 +82,12 @@ const RightSidebar = ({ tableOfContents }) => {
8082
<div className={classes.main}>
8183
<Scrollspy items={toc.map((item) => item.ref)} currentClassName='is-current-' componentTag='div' onUpdate={(e) => onScrollUpdate(e)}>
8284
{toc.map((item) => (
83-
<a key={item.value} href={`#${item.ref}`} className={`${classes.link} ${item.depth === 3 ? classes.indent : ''} ${activeId === item.ref ? 'is-current' : ''}`} onClick={() => highLight(item.ref)}>
85+
<a
86+
key={item.value}
87+
href={`#${item.ref}`}
88+
className={`${classes.link} ${item.depth === 3 ? classes.indent : ''} ${activeId === item.ref ? 'is-current' : ''}`}
89+
onClick={() => highLight(item.ref)}
90+
>
8491
{item.value}
8592
</a>
8693
))}

0 commit comments

Comments
 (0)