Skip to content

Commit

Permalink
Fixed match popover position (#2777)
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-oki authored Dec 3, 2024
1 parent 852f424 commit c62afe7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/StateIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Stack,
Text,
} from "@mantine/core";
import { useHover, useMediaQuery } from "@mantine/hooks";
import { useDisclosure, useMediaQuery } from "@mantine/hooks";
import {
faCheckCircle,
faExclamationCircle,
Expand All @@ -33,7 +33,7 @@ const StateIcon: FunctionComponent<StateIconProps> = ({
}) => {
const hasIssues = dont.length > 0;

const { hovered, ref } = useHover();
const [opened, { close, open }] = useDisclosure(false);

const isMobile = useMediaQuery(`(max-width: ${em(750)})`);

Expand All @@ -52,9 +52,9 @@ const StateIcon: FunctionComponent<StateIconProps> = ({
};

return (
<Popover opened={hovered} position="top" width={360} withArrow withinPortal>
<Popover position="left" opened={opened} width={360} withArrow withinPortal>
<Popover.Target>
<Text ref={ref}>
<Text onMouseEnter={open} onMouseLeave={close}>
<PopoverTarget />
</Text>
</Popover.Target>
Expand Down

0 comments on commit c62afe7

Please sign in to comment.