feat: add scroll to DocumentNav when content has overflow (#26885)

* feat: add scroll to DocumentNav when content has overflow

* Update src/components/UI/docs/DocumentNav.tsx

Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com>

---------

Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com>
pull/26959/head
Nicolás Quiroz 2 years ago committed by GitHub
parent e3ba8526f7
commit 585658d080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/UI/docs/DocumentNav.tsx

@ -20,7 +20,7 @@ export const DocumentNav: FC<Props> = ({ content }) => {
const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId));
return parsedHeadings.length ? (
<Box as='aside' position='sticky' top='4'>
<Box as='aside' position='sticky' h='calc(100vh - 3rem)' overflowY='auto' top='4'>
<Text textStyle='document-nav-title'>on this page</Text>
<Divider borderColor='primary' my={`4 !important`} />
{parsedHeadings.map((heading, idx) => {

Loading…
Cancel
Save