import Layout from '../../components/Layout' import { ComponentsSidebar } from '../../sidebars' import { Playground } from '../../components/Playground'; import { Code, Heading, Paragraph } from '@knkui/typography'; import SyntaxHighlighter from '../../components/SyntaxHighlighter'; export default function Popover() { return ( Implementation details The Popover uses the Positioner from knkUI to handle the positioning logic. Internally the Popover will make sure the Popover is positioned within the viewport. This means that sometimes the Popover flips — or the Popover might move slightly to the left or right. Usage setIsOpen(false)} placement="bottom-start" content={() => ( This is rendered inside the Popover )} trigger={(triggerProps) => ( )} /> ) } ` } /> Content updates Sometimes we will want to change the content inside the popup - but you'll notice it won't move itself it an appropriate position after because the parent popup doesn't actually know anything happened! To fix this you can use a function passed to the content called scheduleUpdate()! ( // Call schedule update when things change )} /> ` } /> ) }