# @embedpdf/react — ./annotation-menu AnnotationDraftMenu [FunctionDeclaration]: export function AnnotationDraftMenu({ children, gap = 8, placement = 'top', } : AnnotationDraftMenuProps){ const anchor = useSelector( AnnotationToken, (annotation) => annotation.getCreationDraft(), sameCreationDraftAnchor, ); if (!anchor) return null; return ( { children(anchor)} ); } AnnotationDraftMenuProps [InterfaceDeclaration]: export interface AnnotationDraftMenuProps{ children: (anchor: CreationDraftAnchor) => React.ReactNode; gap?: number; placement?: AnchoredPlacement; } AnnotationMenu [FunctionDeclaration]: export function AnnotationMenu({ children, gap = 15, placement = 'top'} : AnnotationMenuProps){ const{ projector} = useProjectorBinding(); const anchor = useSelector( AnnotationToken, (annotation) =>{ const selectionAnchor = annotation.getSelectionAnchor(); if (!selectionAnchor) return null; const env = projector.viewEnv(selectionAnchor.page); return env ? annotation.getSelectionAnchor(env) : selectionAnchor; } , sameAnchor, ); if (!anchor) return null; return ( { children} ); } AnnotationMenuProps [InterfaceDeclaration]: export interface AnnotationMenuProps{ children: React.ReactNode; gap?: number; placement?: AnchoredPlacement; } AnnotationRotationBadge [FunctionDeclaration]: export function AnnotationRotationBadge({ children, gap = 16, placement = 'right', } : AnnotationRotationBadgeProps){ const rotation = useAnnotationRotation(); if (!rotation) return null; return ( { children(rotation)} ); } AnnotationRotationBadgeProps [InterfaceDeclaration]: export interface AnnotationRotationBadgeProps{ children: (rotation: RotationAnchor) => React.ReactNode; gap?: number; placement?: AnchoredPlacement; }