Skip to content

Commit

Permalink
fix(VerticalNavigation): added appropriate z-index value to the popup (
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefrua committed May 18, 2023
1 parent ba9579b commit ace8f29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import styled from "@emotion/styled";

import { theme } from "@hitachivantara/uikit-styles";
import { Popper } from "@mui/base";

export const StyledPopupContainer = styled("div")({
const StyledPopupContainer = styled("div")({
marginLeft: theme.spacing("xs"),
});

const StyledPopper = styled(Popper)({
zIndex: theme.zIndices.popover,
});

export { StyledPopupContainer, StyledPopper };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Popper, ClickAwayListener } from "@mui/material";
import { ClickAwayListener } from "@mui/material";
import { clsx } from "clsx";

import {
Expand All @@ -9,7 +9,7 @@ import {
} from "@core/components";
import { setId } from "@core/utils";

import { StyledPopupContainer } from "./NavigationPopup.styles";
import { StyledPopper, StyledPopupContainer } from "./NavigationPopup.styles";

export interface HvVerticalNavigationPopupProps {
id?: string;
Expand Down Expand Up @@ -45,7 +45,7 @@ export const HvVerticalNavigationPopup = ({
};

return (
<Popper open anchorEl={anchorEl} placement="right-start">
<StyledPopper open anchorEl={anchorEl} placement="right-start">
<ClickAwayListener onClickAway={handleClickAway}>
<StyledPopupContainer>
<HvVerticalNavigation open>
Expand All @@ -62,6 +62,6 @@ export const HvVerticalNavigationPopup = ({
</HvVerticalNavigation>
</StyledPopupContainer>
</ClickAwayListener>
</Popper>
</StyledPopper>
);
};

0 comments on commit ace8f29

Please sign in to comment.