mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 23:16:52 +00:00
gitbook
This commit is contained in:
22
themes/gitbook/components/FloatTocButton.js
Normal file
22
themes/gitbook/components/FloatTocButton.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { useMediumGlobal } from '../LayoutBase'
|
||||
|
||||
export default function FloatTocButton () {
|
||||
const { tocVisible, changeTocVisible } = useMediumGlobal()
|
||||
|
||||
const toggleToc = () => {
|
||||
changeTocVisible(!tocVisible)
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
onClick={toggleToc}
|
||||
className={ 'text-black dark:border-gray-500 flex justify-center items-center dark:text-gray-200 py-2 px-2'
|
||||
}
|
||||
>
|
||||
<a
|
||||
id="darkModeButton"
|
||||
className={'fa-list-ol hover:cursor-pointer fas hover:scale-150 transform duration-200'}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user