• MouseSelection component handles the selection of text within a PDF viewer. It provides callbacks for when a selection is made, when selection is enabled, and when the visibility of the selection changes.

    Parameters

    • props: MouseSelectionProps

      The properties for the MouseSelection component.

      • onChange: (isVisible: boolean) => void
      • onEnabled: (event: MouseEvent) => boolean
      • onSelection: (startTarget: HTMLElement, boundingRect: LTWH) => void

    Returns Element

    The MouseSelection component JSX.