mirror of https://github.com/fantasticit/think.git
client: hidden scroll bar in tocs
parent
a26da9c2b9
commit
1c782e23ad
|
@ -122,3 +122,22 @@
|
|||
.semi-navigation-horizontal .semi-navigation-header {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.hidden-scrollbar {
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Anchor, Tooltip } from '@douyinfe/semi-ui';
|
||||
import cls from 'classnames';
|
||||
import { throttle } from 'helpers/throttle';
|
||||
import { useToggle } from 'hooks/use-toggle';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
@ -122,7 +123,7 @@ export const Tocs: React.FC<{ editor: Editor; getContainer: () => HTMLElement }>
|
|||
if (!headings || !headings.length) return null;
|
||||
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<div className={cls(styles.wrapper, 'hidden-scrollbar ')}>
|
||||
<Anchor
|
||||
railTheme={collapsed ? 'muted' : 'tertiary'}
|
||||
maxHeight={'calc(100vh - 360px)'}
|
||||
|
|
Loading…
Reference in New Issue