feat: scrollable post toc

This commit is contained in:
DIYgod
2023-04-06 02:15:04 +01:00
parent 5d4f99fcf8
commit afb3d6ee87
+6 -1
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>