import React, { FC, ReactNode } from 'react' import { css, SimpleInterpolation } from 'styled-components' import { ZIndexNodeName, zIndexValue } from '@monorail/helpers/zIndex' import { PopOverChildProps } from '@monorail/metaComponents/popOver/PopOver' import { IconType } from '@monorail/visualComponents/icon/IconType' import { BBModalBackground, BBModalHeader, mediumModalCloseAnimation, mediumModalOpenAnimation, modalAnimationDuration, useModalAnimation, } from '@monorail/visualComponents/modals/Modals' import { ModalSize } from '@monorail/visualComponents/modals/modalTypes' import { Overlay } from '@monorail/visualComponents/toggle/Overlay' type Props = Omit & { title: string iconLeft?: IconType headerChildren?: ReactNode headerStyles?: SimpleInterpolation customCloseButton?: ReactNode zIndex?: number } export const MediumModal: FC = props => { const { isOpen, onClick, children, title, iconLeft, togglePopOver, headerChildren, customCloseButton, headerStyles, closingAnimationCompleted, zIndex = zIndexValue(ZIndexNodeName.Modal), ...otherProps } = props const { modalBackgroundRef, isRendered } = useModalAnimation({ closingAnimationCompleted, isOpen, }) return ( {children} ) }