import { useMagzineGlobal } from '..' import Catalog from './Catalog' import CatalogFloatButton from './CatalogFloatButton' /** * 悬浮抽屉目录 * @param toc * @param post * @returns {JSX.Element} * @constructor */ const CatalogFloat = ({ post, cRef }) => { const { tocVisible, changeTocVisible } = useMagzineGlobal() const switchVisible = () => { changeTocVisible(!tocVisible) } return (
{ changeTocVisible(true) }} className='fixed right-0 bottom-24 z-20 shadow bg-white dark:bg-hexo-black-gray'> {!tocVisible && }
{/* 侧边菜单 */}
{post && ( <>
)}
{/* 背景蒙版 */}
) } export default CatalogFloat