Description
The Popover component is built on top of the PopperJS library
Basic usage
import { Popover } from '@houzz/ui';function PopoverImplementation() {
const referenceElement = useRef(null);
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
return (
<>
<Button ref={referenceElement} onClick={() => setIsPopoverOpen(true)}>
Open popover
</Button>
<Popover
isOpen={isPopoverOpen}
placement="right"
onClose={() => setIsPopoverOpen(false)}
referenceElement={referenceElement}
>
Hello world
</Popover>
</>
);
}
Props