Skip to content

Commit

Permalink
fix(webapp): z-index of header dropdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JoosepAlviste committed Oct 4, 2023
1 parent da67051 commit a8fa614
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/webapp/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { useState } from 'react'

import { useAuthenticatedUser } from '#/features/auth'
import { Search } from '#/features/search'
import { zIndex } from '#/styles/theme.css'

import { Button } from '../Button'
import { Icon } from '../Icon'
Expand Down Expand Up @@ -52,7 +53,10 @@ export const Header = ({ className }: HeaderProps) => {
</DropdownMenu.Trigger>

<DropdownMenu.Portal>
<DropdownMenu.Content className={s.dropdownContent}>
<DropdownMenu.Content
className={s.dropdownContent}
style={{ zIndex: zIndex.layout.dropdownMenu }}
>
<DropdownMenu.Item onSelect={logOut} className={s.dropdownItem}>
Log out
</DropdownMenu.Item>
Expand Down
2 changes: 2 additions & 0 deletions apps/webapp/src/styles/theme.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const below = -1
const zLayoutHeader = above + base
const zLayoutToast = above + zLayoutHeader
const zLayoutSelect = above + zLayoutHeader
const zLayoutDropdownMenu = above + zLayoutHeader
const zHomePageBackground = below + below + base
const zAuthLayoutSeparator = base
const zSearchPopover = above + zLayoutHeader
Expand All @@ -216,6 +217,7 @@ export const zIndex = {
header: zLayoutHeader,
toast: zLayoutToast,
select: zLayoutSelect,
dropdownMenu: zLayoutDropdownMenu,
},
homePage: {
background: zHomePageBackground,
Expand Down

0 comments on commit a8fa614

Please sign in to comment.