enable overlay for ReplyModal mobile

This commit is contained in:
Tom
2023-05-11 15:24:46 +02:00
parent 4f6b6d18cb
commit 46228ffa5d
3 changed files with 3 additions and 7 deletions
+2 -2
View File
@@ -205,9 +205,9 @@ const ReplyModal = ({ isOpen, closeModal }) => {
onRequestClose={closeModal} onRequestClose={closeModal}
contentLabel="Reply Modal" contentLabel="Reply Modal"
shouldCloseOnEsc={false} shouldCloseOnEsc={false}
shouldCloseOnOverlayClick={false} shouldCloseOnOverlayClick={isMobile}
selectedStyle={selectedStyle} selectedStyle={selectedStyle}
overlayClassName="hide-modal-overlay"> style={isMobile ? ({ overlay: { backgroundColor: "rgba(0,0,0,.25)" }}) : ({ overlay: { backgroundColor: "rgba(0,0,0,0)" }})}>
<Draggable handle=".modal-header" nodeRef={nodeRef} disabled={isMobile}> <Draggable handle=".modal-header" nodeRef={nodeRef} disabled={isMobile}>
<div className="modal-content" ref={nodeRef}> <div className="modal-content" ref={nodeRef}>
<div className="modal-header"> <div className="modal-header">
@@ -2,10 +2,6 @@ import styled from "styled-components";
import Modal from "react-modal"; import Modal from "react-modal";
export const StyledModal = styled(Modal)` export const StyledModal = styled(Modal)`
.hide-modal-overlay {
display: none;
}
.modal-content { .modal-content {
position: fixed; position: fixed;
top: calc(50% - 150px); top: calc(50% - 150px);