import { useState } from "react"; import { usePopper } from "react-popper"; import { List } from "lucide-react"; // document editor import { EditorReadOnlyRefApi, EditorRefApi, IMarking } from "@plane/document-editor"; // helpers import { cn } from "@/helpers/common.helper"; // components import { PageContentBrowser } from "./content-browser"; type Props = { editorRef: EditorRefApi | EditorReadOnlyRefApi | null; isFullWidth: boolean; markings: IMarking[]; sidePeekVisible: boolean; setSidePeekVisible: (sidePeekState: boolean) => void; }; export const PageSummaryPopover: React.FC = (props) => { const { editorRef, markings, sidePeekVisible, setSidePeekVisible } = props; // refs const [referenceElement, setReferenceElement] = useState(null); const [popperElement, setPopperElement] = useState(null); // popper-js const { styles: summaryPopoverStyles, attributes: summaryPopoverAttributes } = usePopper( referenceElement, popperElement, { placement: "bottom-start", } ); return (
{sidePeekVisible && (
)}
{!sidePeekVisible && (
)}
); };