mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
enable overlay for ReplyModal mobile
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user