mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
23 lines
553 B
JavaScript
23 lines
553 B
JavaScript
import { useMediumGlobal } from '../LayoutBase'
|
|
|
|
export default function FloatTocButton () {
|
|
const { tocVisible, changeTocVisible } = useMediumGlobal()
|
|
|
|
const toggleToc = () => {
|
|
changeTocVisible(!tocVisible)
|
|
}
|
|
|
|
return (
|
|
<div
|
|
onClick={toggleToc}
|
|
className={ 'text-black flex justify-center items-center dark:text-gray-200 dark:bg-hexo-black-gray py-2 px-2'
|
|
}
|
|
>
|
|
<a
|
|
id="darkModeButton"
|
|
className={'fa-list-ol cursor-pointer fas hover:scale-150 transform duration-200'}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|