use Box instead of flex Stack for nav items

allows vertical margins of children to properly collapse into one another
This commit is contained in:
Paul Wackerow 2022-12-03 18:50:11 -08:00
parent 3a2a4b1cbf
commit 7e5c3cacbc
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import { FC } from 'react';
import { Divider, Link, Stack, Text } from '@chakra-ui/react';
import { Box, Divider, Link, Text } from '@chakra-ui/react';
import NextLink from 'next/link';
import { parseHeadingId } from '../../../utils/parseHeadingId';
@ -20,7 +20,7 @@ export const DocumentNav: FC<Props> = ({ content }) => {
const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId));
return (
<Stack position='sticky' top='4'>
<Box position='sticky' top='4'>
<Text as='h5' textStyle='document-nav-title'>
on this page
</Text>
@ -39,6 +39,6 @@ export const DocumentNav: FC<Props> = ({ content }) => {
</NextLink>
);
})}
</Stack>
</Box>
);
};