Skip to content

Commit

Permalink
fix pane scroll bars, mobile menu background and add border radius to…
Browse files Browse the repository at this point in the history
… all images
  • Loading branch information
rezrah committed Dec 12, 2023
1 parent b38e5ee commit b49adef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/site/pages/content-examples/kitchen-sink.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ codebase and identify vulnerabilities before they reach production.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

![Placeholder, blank image](https://via.placeholder.com/1000x350/d3d9df/d3d9df.png)

---

###### Do's and Don'ts
Expand Down
6 changes: 4 additions & 2 deletions packages/theme/components/layout/nav-drawer/NavDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {XIcon} from '@primer/octicons-react'
import {Drawer} from './Drawer'
import type {PageItem} from 'nextra/normalize-pages'
import {Sidebar} from '../sidebar/Sidebar'
import {useColorMode} from '../../context/color-modes/useColorMode'

type NavDrawerProps = {
isOpen: boolean
Expand All @@ -13,6 +14,7 @@ type NavDrawerProps = {
}

export function NavDrawer({isOpen, onDismiss, navItems}: NavDrawerProps) {
const {colorMode} = useColorMode()
return (
<Drawer isOpen={isOpen} onDismiss={onDismiss}>
<Box
Expand Down Expand Up @@ -41,13 +43,13 @@ export function NavDrawer({isOpen, onDismiss, navItems}: NavDrawerProps) {
<Box sx={{flexDirection: 'column', display: 'flex'}}>{/* <PrimerNavItems items={primerNavItems} /> */}</Box>
</Box>
{navItems && navItems.length > 0 ? (
<ThemeProvider colorMode="day">
<ThemeProvider colorMode={colorMode}>
<Box
sx={{
flexDirection: 'column',
flex: '1 0 auto',
color: 'fg.default',
bg: 'canvas.default',
bg: 'canvas.subtle',
display: 'flex',
}}
>
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/components/layout/root-layout/Theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function Theme({children, pageOpts}: NextraThemeLayoutProps) {
siteTitle={siteTitle}
/>
</PRCBox>
<PageLayout containerWidth="full" padding="none">
<PageLayout rowGap="none" columnGap="none" padding="none" containerWidth="full">
<PageLayout.Content padding="normal">
<main>
<PRCBox sx={!isHomePage && {display: 'flex', maxWidth: 1600, margin: '0 auto'}}>
Expand Down Expand Up @@ -199,12 +199,12 @@ export function Theme({children, pageOpts}: NextraThemeLayoutProps) {
</main>
</PageLayout.Content>
<PageLayout.Pane
aria-label="Sticky pane"
width="small"
sticky
padding="none"
position="start"
hidden={{narrow: true}}
resizable
divider="line"
>
<Sidebar pageMap={docsDirectories} />
Expand Down
2 changes: 2 additions & 0 deletions packages/theme/css/prose.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@
margin-left: auto;
margin-right: auto;
margin-block-end: var(--spacing);
border-radius: var(--brand-borderRadius-medium);
overflow: hidden;
}

/* ---------------------------------------------------------- */
Expand Down

0 comments on commit b49adef

Please sign in to comment.