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>
This commit is contained in:
parent
e3ba8526f7
commit
585658d080
|
@ -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…
Reference in New Issue