2023-03-17 14:35:03 +01:00
|
|
|
import React from 'react';
|
2023-04-09 08:37:29 +02:00
|
|
|
import { StyledModal } from './styled/CaptchaModal.styled';
|
2023-04-08 13:27:17 +02:00
|
|
|
import useGeneralStore from '../hooks/stores/useGeneralStore';
|
2023-03-17 14:35:03 +01:00
|
|
|
import Modal from 'react-modal';
|
|
|
|
|
import Draggable from 'react-draggable';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ReplyModal = ({ isOpen, closeModal }) => {
|
2023-04-08 13:27:17 +02:00
|
|
|
const selectedStyle = useGeneralStore(state => state.selectedStyle);
|
2023-03-17 14:35:03 +01:00
|
|
|
|
|
|
|
|
const handleCloseModal = () => {
|
|
|
|
|
closeModal();
|
|
|
|
|
};
|
|
|
|
|
|
2023-03-22 14:30:48 +01:00
|
|
|
const nodeRef = React.useRef(null);
|
|
|
|
|
|
2023-03-17 14:35:03 +01:00
|
|
|
return (
|
|
|
|
|
<StyledModal
|
|
|
|
|
isOpen={isOpen}
|
|
|
|
|
onRequestClose={closeModal}
|
|
|
|
|
contentLabel="Reply Modal"
|
|
|
|
|
shouldCloseOnEsc={false}
|
|
|
|
|
shouldCloseOnOverlayClick={false}
|
|
|
|
|
selectedStyle={selectedStyle}
|
|
|
|
|
overlayClassName="hide-modal-overlay">
|
2023-03-22 14:30:48 +01:00
|
|
|
<Draggable handle=".modal-header" nodeRef={nodeRef}>
|
|
|
|
|
<div className="modal-content" ref={nodeRef}>
|
2023-03-17 14:35:03 +01:00
|
|
|
<div className="modal-header">
|
|
|
|
|
Reply to Thread
|
|
|
|
|
<button className="icon" onClick={handleCloseModal} title="close" />
|
|
|
|
|
</div>
|
|
|
|
|
<div id="form">
|
|
|
|
|
<div>
|
2023-03-17 17:49:30 +01:00
|
|
|
<input id="name" type="text" placeholder="Name"></input>
|
2023-03-17 14:35:03 +01:00
|
|
|
</div>
|
|
|
|
|
<div>
|
2023-03-23 16:01:53 +01:00
|
|
|
<input id="name" type="text" placeholder="Embed link" disabled></input>
|
2023-03-17 14:35:03 +01:00
|
|
|
</div>
|
|
|
|
|
<div>
|
2023-03-17 17:49:30 +01:00
|
|
|
<textarea rows="4" placeholder="Comment" wrap="soft"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<button id="next">Post</button>
|
2023-03-17 14:35:03 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Draggable>
|
|
|
|
|
</StyledModal>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Modal.setAppElement('#root');
|
|
|
|
|
|
2023-03-21 11:17:54 +01:00
|
|
|
export default ReplyModal;
|