Standalone Popover
Abstracting the Popover component so that it can be used without PopoverDisclosure
or PopoverAnchor
. This example uses the getAnchorRect
prop to determine the position of the popup.
1234567891011121314151617181920212223242526272829
import { useState } from "react";import {} from "./popover.tsx";import "./style.css";export default function Example() {const [open, setOpen] = useState(false);return (<div>Accept inviteWe are going to discuss what we have achieved on the project.</div>);}import { useState } from "react";import {} from "./popover.tsx";import "./style.css";export default function Example() {const [open, setOpen] = useState(false);return (<div>Accept inviteWe are going to discuss what we have achieved on the project.</div>);}