diff --git a/packages/docz-theme-default/src/components/shared/Sidebar/index.tsx b/packages/docz-theme-default/src/components/shared/Sidebar/index.tsx index a174c01ac..f2e5bec1c 100644 --- a/packages/docz-theme-default/src/components/shared/Sidebar/index.tsx +++ b/packages/docz-theme-default/src/components/shared/Sidebar/index.tsx @@ -14,14 +14,17 @@ interface Wrapper { const wrapperToggle = (p: Wrapper) => (p.opened ? '-90%' : '0') const Wrapper = styled('div')` + ${p => p.theme.mq({ + position: ['absolute', 'absolute', 'relative'] + })}; display: flex; - position: relative; flex-direction: column; height: 100%; - background: ${p => wrapperToggle(p) !== '0' ? p.theme.colors.white : p.theme.colors.grayLight}; + background: ${p => + wrapperToggle(p) !== '0' ? p.theme.colors.white : p.theme.colors.grayLight}; transition: transform 0.3s, background 0.3s; transform: translateX(${wrapperToggle}); - z-index: 99; + z-index: 100; ${p => p.theme.styles.sidebar}; @@ -135,7 +138,8 @@ export const Sidebar = () => ( {({ docs, menus }) => { const docsWithoutMenu = docs.filter((doc: Entry) => !doc.menu) - const fromMenu = (menu: string) => docs.filter(doc => doc.menu === menu) + const fromMenu = (menu: string) => + docs.filter(doc => doc.menu === menu) return ( diff --git a/packages/docz-theme-default/src/styles/index.ts b/packages/docz-theme-default/src/styles/index.ts index 98fc32c66..4c75161a7 100644 --- a/packages/docz-theme-default/src/styles/index.ts +++ b/packages/docz-theme-default/src/styles/index.ts @@ -17,7 +17,7 @@ export const styles = { container: { padding: '50px 50px 100px', width: 960, - maxWidth: '100%' + maxWidth: '100%', }, h1: { margin: '30px 0',