Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase toc width and scroll overflow #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions dokz/src/components/FloatingTableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import parseGithubUrl from 'parse-github-url'
import { useDokzConfig } from '../provider'

export function FloatingTableOfContents({
table,
table,
...rest
}: {
table: DokzTableOfContents
Expand All @@ -25,12 +25,11 @@ export function FloatingTableOfContents({
return (
<Stack
spacing='1em'
width='200px'
// minH='1.6em'
// lineHeight='2.2em'
// fontWeight='medium'
// borderLeftWidth='1px'
pl='20px'
pl='10px'
{...rest}
>
{githubUrl && (
Expand All @@ -48,10 +47,12 @@ export function FloatingTableOfContents({
</Box>
)}
{/* <Box fontWeight='semibold'>ON THIS PAGE</Box> */}
{table.children &&
table.children.map((table) => {
return <TableItem key={table.slug} {...table} />
})}
<Stack overflowX="auto">
{table.children &&
table.children.map((table) => {
return <TableItem key={table.slug} {...table} />
})}
</Stack>
</Stack>
)
}
Expand Down
5 changes: 2 additions & 3 deletions dokz/src/components/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { globalStyles, getMdxSidebarTree } from './support'
import { FooterButtons } from './FooterButtons'

const SIDENAV_W = 280
const TABLE_OF_C_W = 200
const TABLE_OF_C_W = 250

const NAVBAR_H = 62

Expand Down Expand Up @@ -145,9 +145,8 @@ export function Wrapper(props) {
position='sticky'
alignSelf='flex-start'
top={NAVBAR_H}
width={TABLE_OF_C_W + 'px'}
width={TABLE_OF_C_W}
// right={0}
ml='auto'
height='auto'
display={['none', null, null, null, 'block']}
pt='20px'
Expand Down