fix: adjust position of table of contents in Doc component (#15996)

This commit is contained in:
GuanMu 2025-03-17 19:37:21 +08:00 committed by GitHub
parent fe0d932f50
commit db7a37a111
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,7 @@ const Doc = ({ apiBaseUrl }: DocProps) => {
return ( return (
<div className="flex"> <div className="flex">
<div className={`fixed right-16 top-32 z-10 transition-all ${isTocExpanded ? 'w-64' : 'w-10'}`}> <div className={`fixed right-20 top-32 z-10 transition-all ${isTocExpanded ? 'w-64' : 'w-10'}`}>
{isTocExpanded {isTocExpanded
? ( ? (
<nav className="toc w-full bg-gray-50 p-4 rounded-lg shadow-md max-h-[calc(100vh-150px)] overflow-y-auto"> <nav className="toc w-full bg-gray-50 p-4 rounded-lg shadow-md max-h-[calc(100vh-150px)] overflow-y-auto">