useContextualToolbarPosition

See source code
function useContextualToolbarPosition({
  isVisible,
  toolbarRef,
  selectionBounds,
}: {
  isVisible: boolean
  selectionBounds?: Box
  toolbarRef: RefObject<HTMLDivElement>
}): {
  indicatorOffset: number
  visible: boolean
  x: number
  y: number
}

Parameters

NameDescription

{ isVisible, toolbarRef, selectionBounds, }

{
  isVisible: boolean
  selectionBounds?: Box
  toolbarRef: RefObject<HTMLDivElement>
}

Returns

{
  indicatorOffset: number
  visible: boolean
  x: number
  y: number
}
Prev
useCollaborationStatus
Next
useCopyAs