mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 13:06:40 +00:00
Merge pull request #122 from ethereum/document-nav-spacing
Fix spacing for DocumentNav links [Fixes #87]
This commit is contained in:
commit
4a464da994
2 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import { FC } from 'react';
|
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 NextLink from 'next/link';
|
||||||
|
|
||||||
import { parseHeadingId } from '../../../utils/parseHeadingId';
|
import { parseHeadingId } from '../../../utils/parseHeadingId';
|
||||||
|
|
@ -20,7 +20,7 @@ export const DocumentNav: FC<Props> = ({ content }) => {
|
||||||
const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId));
|
const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack position='sticky' top='4'>
|
<Box position='sticky' top='4'>
|
||||||
<Text as='h5' textStyle='document-nav-title'>
|
<Text as='h5' textStyle='document-nav-title'>
|
||||||
on this page
|
on this page
|
||||||
</Text>
|
</Text>
|
||||||
|
|
@ -32,6 +32,7 @@ export const DocumentNav: FC<Props> = ({ content }) => {
|
||||||
<Text
|
<Text
|
||||||
color={activeHash === heading?.headingId ? 'body' : 'primary'}
|
color={activeHash === heading?.headingId ? 'body' : 'primary'}
|
||||||
textStyle='document-nav-link'
|
textStyle='document-nav-link'
|
||||||
|
mb={3.5}
|
||||||
_hover={{
|
_hover={{
|
||||||
background: 'primary',
|
background: 'primary',
|
||||||
boxShadow: '0 0 0 6px var(--chakra-colors-primary)',
|
boxShadow: '0 0 0 6px var(--chakra-colors-primary)',
|
||||||
|
|
@ -56,6 +57,6 @@ export const DocumentNav: FC<Props> = ({ content }) => {
|
||||||
</NextLink>
|
</NextLink>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Stack>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ export const textStyles = {
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
lineHeight: 5,
|
lineHeight: 5,
|
||||||
letterSpacing: '1%',
|
letterSpacing: '1%',
|
||||||
mb: 4
|
|
||||||
},
|
},
|
||||||
'note-text': {
|
'note-text': {
|
||||||
fontFamily: 'body',
|
fontFamily: 'body',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue