/* eslint-disable jsx-a11y/mouse-events-have-key-events */ import React from 'react'; import AnnotationOptions from '../AnnotationOptions'; import Markup from '../Markup'; import { rectCalc } from '../../helpers/position'; import { strip } from '../../helpers/utility'; import { Popper } from './styled'; const Highlight: React.SFC = ({ id, obj_type, obj_attr: { page, position, bdcolor, transparency }, isCovered, mousePosition, isCollapse, onUpdate, onDelete, scale, viewport, onMouseOver, onMouseOut, }: AnnotationElementPropsType) => ( <> {Array.isArray(position) && position.map((ele: any, index: number) => { const annotRect = rectCalc(ele, viewport.height, scale); return ( ); })} {!isCollapse ? ( ) : null} ); export default Highlight;