import React from 'react' import { GrClose } from 'react-icons/gr' import { Popover } from '@headlessui/react' import { ToolTip } from './tool-tip' import { IframeManager } from '@app/managers' import { Annotations } from './annotations' type AnnotationContainerProps = { contrastRatio?: string source: string portalID: number elementParent: string message: string code: string context: string recurrence: string errorType: 'warning' | 'error' } export function AnnotationContainer({ contrastRatio, source, // errorType, portalID, elementParent, message, code, context, recurrence, errorType, }: AnnotationContainerProps) { const modalTitle = `${portalID || context + code}-rec-modal-title` const modalDescription = `${portalID || context + code}-rec-modal-description` return ( {({ open }) => ( <> {open ? (

{code}

{context}

{recurrence ? (

Recurred: {recurrence} times

) : null}

{message}

{String(message)?.includes('contrast ratio') ? ( ) : null}
) : null}
)}
) }