feat: add useSetOverflowVisibleOnRA hook
This commit is contained in:
committed by
Christel Westerberg
parent
1004871afb
commit
e18a2fdc44
@@ -1,4 +1,3 @@
|
||||
import { useRef } from "react"
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
} from "react-aria-components"
|
||||
|
||||
import { CloseLargeIcon } from "@/components/Icons"
|
||||
import useSetOverFlowVisibleOnRA from "@/hooks/useSetOverflowVisibleOnRA"
|
||||
|
||||
import { Arrow } from "./Arrow"
|
||||
import { PopoverProps } from "./popover"
|
||||
@@ -19,10 +19,10 @@ export default function Popover({
|
||||
children,
|
||||
...props
|
||||
}: PopoverProps) {
|
||||
let triggerRef = useRef(null)
|
||||
const setOverflowVisible = useSetOverFlowVisibleOnRA()
|
||||
|
||||
return (
|
||||
<DialogTrigger>
|
||||
<DialogTrigger onOpenChange={setOverflowVisible}>
|
||||
<Button className={styles.trigger}>{triggerContent}</Button>
|
||||
|
||||
<RAPopover
|
||||
|
||||
Reference in New Issue
Block a user