File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import * as Search from './search'
55import NavDrawer from './nav-drawer'
66import Link from './link'
77import useSearch from '../hooks/use-search'
8- import { HEADER_HEIGHT , HEADER_BAR } from '../constants'
8+ import { HEADER_HEIGHT , HEADER_BAR , Z_INDEX } from '../constants'
99import headerNavItems from '../../content/header-nav.yml'
1010import { DarkTheme } from '../theme'
1111import SiteTitle from './site-title'
@@ -19,7 +19,7 @@ function Header() {
1919 const search = useSearch ( )
2020
2121 return (
22- < DarkTheme sx = { { top : 0 , position : 'sticky' , zIndex : 1 } } >
22+ < DarkTheme sx = { { top : 0 , position : 'sticky' , zIndex : Z_INDEX . HEADER } } >
2323 < NpmHeaderBar />
2424 < Box
2525 as = "header"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {AnimatePresence, motion} from 'framer-motion'
55import { FocusOn } from 'react-focus-on'
66import TextInput from './text-input'
77import useSiteMetadata from '../hooks/use-site-metadata'
8- import { HEADER_BAR , HEADER_HEIGHT } from '../constants'
8+ import { HEADER_BAR , HEADER_HEIGHT , Z_INDEX } from '../constants'
99import { LightTheme } from '../theme'
1010import { LinkNoUnderline } from './link'
1111import * as getNav from '../util/get-nav'
@@ -132,7 +132,7 @@ export const Mobile = ({
132132 left : 0 ,
133133 right : 0 ,
134134 bottom : 0 ,
135- zIndex : 1 ,
135+ zIndex : Z_INDEX . SEARCH_OVERLAY ,
136136 } }
137137 >
138138 < Box
@@ -169,7 +169,7 @@ export const Mobile = ({
169169 borderColor : 'border.muted' ,
170170 position : 'relative' ,
171171 bg : 'canvas.default' ,
172- zIndex : 9999 ,
172+ zIndex : Z_INDEX . SEARCH_OVERLAY + 1 ,
173173 } }
174174 >
175175 < motion . div
Original file line number Diff line number Diff line change @@ -11,3 +11,8 @@ export const SKIP_TO_CONTENT_ID = 'skip-to-content'
1111export const SKIP_TO_SEARCH_ID = 'search-box-input'
1212
1313export const CLI_PATH = '/cli'
14+
15+ export const Z_INDEX = {
16+ HEADER : 10 ,
17+ SEARCH_OVERLAY : 25
18+ }
You can’t perform that action at this time.
0 commit comments