diff --git a/src/components/Common/Modal/index.tsx b/src/components/Common/Modal/index.tsx index 126c81a64..893b81143 100644 --- a/src/components/Common/Modal/index.tsx +++ b/src/components/Common/Modal/index.tsx @@ -6,6 +6,7 @@ import { useLockBodyScroll } from '../../../hooks/useLockBodyScroll'; import globalMessages from '../../../i18n/globalMessages'; import Transition from '../../Transition'; import Button, { ButtonType } from '../Button'; +import CachedImage from '../CachedImage'; import LoadingSpinner from '../LoadingSpinner'; interface ModalProps { @@ -29,6 +30,7 @@ interface ModalProps { backgroundClickable?: boolean; iconSvg?: ReactNode; loading?: boolean; + backdrop?: string; } const Modal: React.FC = ({ @@ -53,6 +55,7 @@ const Modal: React.FC = ({ tertiaryDisabled = false, tertiaryText, onTertiary, + backdrop, }) => { const intl = useIntl(); const modalRef = useRef(null); @@ -66,7 +69,7 @@ const Modal: React.FC = ({ return ReactDOM.createPortal( // eslint-disable-next-line jsx-a11y/no-static-element-interactions
{ if (e.key === 'Escape') { typeof onCancel === 'function' && backgroundClickable @@ -98,7 +101,7 @@ const Modal: React.FC = ({ show={!loading} >
= ({ maxHeight: 'calc(100% - env(safe-area-inset-top) * 2)', }} > -
+ {backdrop && ( +
+ +
+
+ )} +
{iconSvg &&
{iconSvg}
}
= ({
{children && ( -
+
{children}
)} {(onCancel || onOk || onSecondary || onTertiary) && ( -
+
{typeof onOk === 'function' && (