feat: scrollable post toc

This commit is contained in:
DIYgod 2023-04-06 02:15:04 +01:00
parent 5d4f99fcf8
commit afb3d6ee87
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -115,7 +115,12 @@ export const PostToc: React.FC<{
}}
ref={containerRef}
>
<div className="sticky top-14 text-sm leading-loose whitespace-nowrap truncate text-ellipsis">
<div
className="sticky top-14 text-sm leading-loose whitespace-nowrap text-ellipsis max-h-[calc(100vh-theme('spacing.28'))] truncate"
style={{
overflowY: "auto",
}}
>
{renderItems(data?.map, activeId)}
</div>
</div>