feature: 侧边目录颜色、动画

This commit is contained in:
tangly1024
2022-01-07 10:55:06 +08:00
parent b16b3dee59
commit 309e42f4a1
4 changed files with 6 additions and 6 deletions

View File

@@ -64,14 +64,14 @@ const Toc = ({ toc, targetRef }) => {
key={id}
href={`#${id}`}
className={`notion-table-of-contents-item duration-300 transform font-light
notion-table-of-contents-item-indent-level-${tocItem.indentLevel}
${activeSection === id && ' font-bold text-gray-600 dark:text-gray-300'}`}
notion-table-of-contents-item-indent-level-${tocItem.indentLevel} `}
>
<span
style={{
display: 'inline-block',
marginLeft: tocItem.indentLevel * 16
}}
className={`${activeSection === id && ' font-bold text-red-400 animate__animated animate__jello'}`}
>
{tocItem.text}
</span>